tags:

views:

1227

answers:

3

When I try to create a soap object, I get a fault when I first initialize the class. I can't set driver.options["protocol.http.ssl_config.verify_mode"] = OpenSSL::SSL::VERIFY_NONE because its already faulted. Any ideas?

require 'soap/wsdlDriver' => []

wsdl = "https://somesiteinhttps.com" driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver at depth 0 - 20: unable to get local issuer certificate

OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

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)
A: 

Somewhat figured it out. Downgraded ruby to 1.8.5 instead of using 1.8.7 and the same code worked.

A: 

i upgraded to httpclient 2.1.5.2 and did not get this error anymore

austinfromboston
A: 

Upgrading gem httpclient to version 2.1.5.2 fixed the error. thanks austinfromboston.

Nilesh