作者a83294 (马岱)
看板Ruby
标题[问题] ruby处理soap使用savon
时间Mon May 19 16:24:18 2014
现在想用ruby (client端)去使用soap
google一下就看到了savon,结果require之後却完全没办法动作...
按照官方的tutorial的程式码
require 'savon'
client = Savon.client(wsdl: '
http://service.example.com?wsdl')
client.operations
response = client.call(:find_user, message: { id: 42 })
response.body
$ ruby savontest.rb之後
.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/lib/excon/socket.rb:181:
in `getaddrinfo': getaddrinfo: nodename nor servname provided,
or not known (SocketError) (Excon::Errors::SocketError)
from /Users/david/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/
lib/excon/socket.rb:181:in `connect'
from /Users/david/.rvm/gems/ruby-2.0.0-p353/gems/excon-0.33.0/
lib/excon/socket.rb:28:in `initialize'
...
http://imgur.com/QQ09rvJ
错误狂喷,请问是我哪里用错了吗?
我看了一下觉得soap应该跟getjson很像吧@@
烦请解惑,谢谢...
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.121.146.35
※ 文章网址: http://webptt.com/cn.aspx?n=bbs/Ruby/M.1400487861.A.8A3.html
1F:→ hSATAC:就连不到,先确定一下网址有没有打错或连不连的到吧 05/19 17:53
2F:→ a83294:感谢Ash大回答,原来真的是坏掉了连不上,状况已排除 05/20 21:19