我如何查看 Savon 发送的内容
How can I view what is being sent out in Savon
所以我有这样的东西...
require 'savon'
client = Savon.client do
wsdl 'OnboardingServices?wsdl'
pretty_print_xml true
end
response = client.call(:recruiter_onboarding_request)
如何查看实际发送到 Soap 服务器的内容?
在版本 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" }
)
所以我有这样的东西...
require 'savon'
client = Savon.client do
wsdl 'OnboardingServices?wsdl'
pretty_print_xml true
end
response = client.call(:recruiter_onboarding_request)
如何查看实际发送到 Soap 服务器的内容?
在版本 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" }
)