是否有使用SOAP4R的WSDL解析器的示例?我试图列出WSDL文件的所有操作,但我无法弄清楚:(你能给我一些教程吗?Thx
也许这不是您想要的答案,但我建议您改用Savon。例如,您的任务看起来像下面这个片段(这个例子取自github的savon页面):
require "savon"
# create a client for your SOAP service
client = Savon::Client.new("http://service.example.com?wsdl")
client.wsdl.soap_actions
# => [:create_user, :get_user, :get_all_users]
# execute a SOAP request to call the "getUser" action
response = client.request(:get_user) do
soap.body = { :id => 1 }
end
response.body
# => { :get_user_response => { :first_name => "The", :last_name => "Hoff" } }