当我尝试创建一个soap对象时,我在第一次初始化类时遇到了错误。我无法设置driver.options [“protocol.http.ssl_config.verify_mode”] = OpenSSL :: SSL :: VERIFY_NONE,因为它已经出现故障。有任何想法吗?
要求'soap / wsdlDriver' => []
wsdl =“https://somesiteinhttps.com” driver = SOAP :: WSDLDriverFactory.new(wsdl).create_rpc_driver 在深度0 - 20:无法获得本地发行人证书
OpenSSL :: SSL :: SSLError:SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/session.rb:247:in `connect'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/session.rb:247:in `ssl_connect'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/session.rb:639:in `connect'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/timeout.rb:128:in `timeout'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/session.rb:631:in `connect'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/session.rb:522:in `query'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient/session.rb:147:in `query'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient.rb:942:in `do_get_block'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient.rb:758:in `do_request'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient.rb:837:in `protect_keep_alive_disconnected'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient.rb:757:in `do_request'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient.rb:822:in `follow_redirect'
from /usr/lib/ruby/gems/1.8/gems/httpclient-2.1.4/lib/httpclient.rb:514:in `get_content'
from /usr/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:64:in `fetch'
from /usr/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:30:in `import'
from /usr/lib/ruby/1.8/wsdl/importer.rb:18:in `import'
from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:124:in `import'
from /usr/lib/ruby/1.8/soap/wsdlDriver.rb:28:in `initialize'
from (irb):15:in `new'
from (irb):15>> driver = SOAP::WSDLDriverFactory.new(wsdl)
答案 0 :(得分:0)
有点想通了。将ruby降级为1.8.5,而不是使用1.8.7并且相同的代码工作。
答案 1 :(得分:0)
我升级到httpclient 2.1.5.2并且不再出现此错误