所以我有这样的事情......
require 'savon'
client = Savon.client do
wsdl 'OnboardingServices?wsdl'
pretty_print_xml true
end
response = client.call(:recruiter_onboarding_request)
如何查看实际发送到Soap服务器的内容?
答案 0 :(得分:1)
在版本2.x中,我通常像这样构建我的客户端:
require 'savon'
client = Savon.client(
wsdl: "http://www.some-server.com/service?wsdl",
pretty_print_xml: true,
log: true,
log_level: :debug
)
puts client.operations
resp = client.call(:some_method,
message: { :some => "key", :and => "another one" }
)