views:

237

answers:

1

This post is somewhat similar to this other post:

http://stackoverflow.com/questions/128660/how-can-i-make-rubys-soaprpcdriver-work-with-self-signed-certificates

except I'm using WSDLDriverFactory:

@loginWsdlUrl = 'https://localhost:9843/services/LoginService?wsdl'
loginClient = SOAP::WSDLDriverFactory.new(@loginWsdlUrl)
loginClient.options['protocol.http.ssl_config.verify_mode' ] = OpenSSL::SSL::VERIFY_NONE 

WSDLDriverFactory opens the URL inside the .new() method so it seems impossible to set any options first. I never get to the .options[] line.

How can I set the options ahead of time? Or, install a do-nothing verifier?

A: 

loginClient.options['protocol.http.ssl_config.verify_mode' ] = nil

Trix Farrar
You didn't read the post. The connection is initiated inside of the .new() call, setting the option after the fact won't solve anything.
Eric Anderson
I read the post, but misread that you're using WSDLFactory. You're probably going to have to pull the WSDL out-of-band and use the locally cached copy to run WSDLfactory against.
Trix Farrar