1

这篇文章与另一篇文章有​​些相似:

如何使 Ruby 的 SOAP::RPC::Driver 与自签名证书一起使用?

除了我使用的是 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 在 .new() 方法中打开 URL,因此似乎不可能先设置任何选项。我从来没有到达 .options[] 行。

如何提前设置选项?或者,安装一个什么都不做的验证器?

4

1 回答 1

0

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

于 2010-10-25T18:49:24.760 回答