How to avoid SSL verification on Ruby SOAP calls

Problem

You will get following error when you are making SOAP calls to external web service using ruby's SOAP library 

OpenSSL::SSL::SSLError: certificate verify failed 

code might look something like this

driverSOAP::RPC::Driver.new("https://<your soap end point>", "<soap URN>")

driver.add_method('<method>',"name", "password")

…..


Solution


Just add following line to your code (right before you make a call to end point )

driver.options["protocol.http.ssl_config.verify_mode"] = nil 


Above line turns off the SSL verification while making soap calls.




Blogged with MessageDance using Gmail | Reply On Twitter

Comments

Leave a Reply