Search code examples
rubyxmlsoapsavon

SOAP action using savon version 2 ruby gem


I am working on a client for a SOAP service, I got the authentication XML HTTP post with wireshark, how do I create the same post using savon 2 ?

enter image description here


Solution

  • try something along these lines

    ...
    client = Savon::Client.new "https://...?wsdl"
    response = client.request "VerifyUserAccount" do  
      soap.input = ["VerifyUserAccount", {"xmlns" => "http://tempuri.org/uri_api_2008/service/"}]
      soap.body = {
        "Arguments" => ["Admin",1234]
        ...
      }
      ...
    end  
    ...