2010-05-05 53 views
0

當我執行 馬修$ /Users/Mathieu/.gem/ruby/1.8/bin/wsdl2ruby.rb路徑--wsdl https://www.arello.com/webservice/verify.cfc?wsdl --type客戶--force的Rails:SOAP4R - 錯誤,同時運行wsdl2ruby.rb

我得到

在深度0 - 20:無法獲取本地頒發者證書 樓[2010-05-06T10:41:11.040288#35933] FATAL - 應用程序:檢測到異常。停止... SSL_connect返回= 1 errno = 0狀態= SSLv3讀取服務器證書B:證書驗證失敗(OpenSSL :: SSL :: SSLError) /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1。 5.2/lib/httpclient/session.rb:247:connect' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:247:in ssl_connect' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:639:in connect' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient/timeout.rb:128:in timeout ' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:631:in connect' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient/session.rb:522:in查詢' /Users/Mathieu/.gem/ruby/1.8/gems /httpclient-2.1.5.2/lib/httpclient/session.rb:147:in query' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:953:in do_get_block' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:765: in do_request' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:848:in protect_keep_alive_disconnected' /Users/Mathieu/.gem/ruby /1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:764:in do_request' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb:833:in follow_redirect' /Users/Mathieu/.gem/ruby/1.8/gems/httpclient-2.1.5.2/lib/httpclient.rb: 519:get_content' /Users/Mathieu/.gem/ruby/1.8/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/importer.rb:73:in提取' /Users/Mathieu/.gem/ruby/1.8/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/importer.rb:36:in import' /Users/Mathieu/.gem/ruby/1.8/gems/soap4r-1.5.8/lib/wsdl/importer.rb:18:in import' /Users/Mathieu /。 gem/ruby​​/1.8/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:206:在import' /Users/Mathieu/.gem/ruby/1.8/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:36:in運行' /Users/Mathieu/.gem/ruby/1.8/gems/soap4r-1.5.8 /bin/wsdl2ruby.rb:46:in run' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/logger.rb:659:in start' /Users/Mathieu/.gem/ruby/1.8/gems/soap4r-1.5.8/bin/wsdl2ruby.rb:137 /Users/Mathieu/.gem/ ruby/1.8/bin/wsdl2ruby.rb:19:'load' /Users/Mathieu/.gem/ruby/1.8/bin/wsdl2ruby.rb:19 I,[20 10-05-06T10:41:11.040855#35933]信息 - app:應用程序結束。 (狀態:-1)

回答

2

執行此操作的快速方法是使用類似curl的工具將WSDL獲取到文件中,然後只需要wsdl2ruby使用此文件創建SOAP客戶端。 Ruby比命令行實用程序更挑剔SSL證書,並且有代碼中使用HTTPS的方法,但我認爲您需要取消實用程序中的代碼。所有你需要的是定義。

這也有一個不容忽視的優點,即允許您保留源代碼控制系統中使用的WSDL作爲參考。

+0

謝謝,它的工作原理 – Mathieu 2010-05-12 00:33:38