views:

128

answers:

1

I am trying to run the following code to call a webservice from ruby but get an error 'SSL not supported'.

I have httpclient 2.1.5.2 installed.

require 'soap/wsdlDriver'

def validate_certificate(is_ok, ctx)
  cert = ctx.current_cert
  unless (cert.subject.to_s == cert.issuer.to_s) #check the server certificate only
    is_ok &&= File.open(file_name).read == ctx.current_cert.to_pem
  end
  is_ok
end 

def test_webservice
  wsdl = "https://.../service.wsdl"
  driver = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
  driver.options['protocol.http.ssl_config.verify_callback'] = method(:validate_certificate)

  driver.method(params)
end
A: 

could this be your problem?
http://groups.google.com/group/soap4r/browse_thread/thread/e4d87acac8fe51d5

rubiii