0

SOAP4R を使用した WSDL パーサーの例はありますか? WSDL ファイルのすべての操作をリストしようとしていますが、理解できません :( チュートリアルを投稿できますか? Thx

4

1 に答える 1

4

それはあなたが望む答えではないかもしれませんが、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" } }
于 2011-10-22T17:58:17.020 に答える