';不支持SSL';在Ruby中调用https web服务时

';不支持SSL';在Ruby中调用https web服务时,ruby,web-services,soap4r,Ruby,Web Services,Soap4r,我试图运行以下代码从ruby调用webservice,但出现错误“SSL不受支持” 我已经安装了httpclient 2.1.5.2 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

我试图运行以下代码从ruby调用webservice,但出现错误“SSL不受支持”

我已经安装了httpclient 2.1.5.2

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

这可能是你的问题吗?

也许您的Ruby安装没有内置SSL支持?请查看您平台的安装文档。