I'm working with ruby and Savon 2. I have been given the following SOAP example:
POST /WebApi/Services/b2bapi.asmx HTTP/1.1
Host: api.nationsphotolab.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "https://api.nationsphotolab.com/AddNewOrder"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddNewOrder xmlns="http://api.nationsphotolab.com/">
<orderXml>string</orderXml>
<passport>
<Source>string</Source>
<Hash>string</Hash>
</passport>
</AddNewOrder>
</soap:Body>
</soap:Envelope>
I have tried a bunch of different methods of creating the XML, first using XmlMarkup builder, and then just building a hash and passing it into the savon client call.
The error I've been getting:
Savon::SOAPFault ((soap:Server) Server was unable to process request. ---> Object reference not set to an instance of an object.):
Here's the request:
client = Savon.client(wsdl: "http://api.nationsphotolab.com/WebApi/Services/b2bapi.asmx?wsdl")
response = client.call(:add_new_order, message: data)
With data being an XML created using XmlMarkup builder. Attached is a screenshot of data.
Please let me know if I can provide anymore information
Thank you!