Hi all. I am getting into the API of a service that I use, and they implement SOAP, so I got Savon working on my machine and went to task learning this stuff.
Well, I've done this:
require 'savon'
client = Savon.client(wsdl: "WSDL_HYPERLINK")
and got all the operations, and went to call the login operation:
response = client.call(:login) do
message(loginId: "username", password: "password")
end
replacing the username and password with the correct fields, obviously.
However, I get this error:
from /var/lib/gems/2.0.0/gems/savon-2.5.1/lib/savon/response.rb:85:in `raise_soap_and_http_errors!'
from /var/lib/gems/2.0.0/gems/savon-2.5.1/lib/savon/response.rb:14:in `initialize'
from /var/lib/gems/2.0.0/gems/savon-2.5.1/lib/savon/operation.rb:64:in `new'
from /var/lib/gems/2.0.0/gems/savon-2.5.1/lib/savon/operation.rb:64:in `create_response'
from /var/lib/gems/2.0.0/gems/savon-2.5.1/lib/savon/operation.rb:55:in `call'
from /var/lib/gems/2.0.0/gems/savon-2.5.1/lib/savon/client.rb:36:in `call'
from (irb):44
from /usr/bin/irb:12:in `<main>'
What's going on here? The documentation on my service's API site says that all errors are thrown as SOAP faults, but how do I read this?
Just as information, the service says that the login method has two parameters:
1) loginId of type string
2) password of type string
Am I entering the "parameters" in the incorrect way, i.e. should they not me a locals message?
Thanks.
- Hameed G.