我正在努力让 Savon gem 连接到我们的一台服务器。我不断收到一条错误消息,指出我无法通过 ssl。我已经阅读了许多教程和修复,但似乎没有一个有效。
任何帮助表示赞赏 - 如果我能度过它,这将成为我的星期一:-)。
错误:
D, [2011-06-20T09:43:02.002993 #10328] DEBUG -- : Retrieving WSDL from: http://path_to_wsdl:4443/sm/services/mailing/2009/03/02?wsdl
D, [2011-06-20T09:43:02.129057 #10328] DEBUG -- : HTTPI executes HTTP GET using the httpclient adapter
/.rvm/gems/ruby-1.9.2-p0/gems/httpclient-2.2.1/lib/httpclient/session.rb:276:in `connect': SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: sslv3 alert unexpected message (OpenSSL::SSL::SSLError)
我的代码:
require 'savon'
client = Savon::Client.new "path_to_my_wsdl"
client.http.auth.ssl.cert_file = "path/cert.pem"
client.http.auth.ssl.cert_key_file = "/path/localhost.key"
client.http.auth.ssl.verify_mode = :none
client.wsse.credentials "username", "password"
client.wsdl.soap_actions