I am sending a request to a SOAP API and unfortunately my knowledge of SOAP is limited. The following two requests both return a response but the response differs. The not working example returns a send_fax_response only. The working returns a send_fax_response and a send_fax_result. Any ideas as to why? Could it be the order?
Not working
SOAP request: https://faxregistration.com/SfaxWS/SfaxAPI.asmx
SOAPAction: "http://tempuri.org/sendFax", Content-Type: text/xml;charset=UTF-8, User-Agent: sfax-api gem 0.0.1
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:wsdl="http://tempuri.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ins0="http://tempuri.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<ins0:sendFax>
<ins0:xDoc>
<FaxRequest>
<DocMerge>false</DocMerge>
<RecipientFax>555.123.4567</RecipientFax>
<Password>test</Password>
<UserId>test</UserId>
<image>PGh0bWw+PGJvZHk+VGVzdCBGYXg8L2JvZHk+PC9odG1sPg==</image>
<DocType>html</DocType>
<RecipientName>test</RecipientName>
</FaxRequest>
</ins0:xDoc>
</ins0:sendFax>
</env:Body>
</env:Envelope>
Working
SOAP request: https://faxregistration.com/SfaxWS/SfaxAPI.asmx
SOAPAction: "http://tempuri.org/sendFax", Content-Type: text/xml;charset=UTF-8, User-Agent: sfax-api gem 0.0.1
<?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>
<sendFax xmlns="http://tempuri.org/">
<xDoc>
<FaxRequest>
<UserId>test</UserId>
<Password>test</Password>
<RecipientName>test</RecipientName>
<RecipientFax>555.123.4567</RecipientFax>
<DocType>html</DocType>
<image>PGh0bWw+PGJvZHk+VGVzdCBGYXg8L2JvZHk+PC9odG1sPg==</image>
<DocMerge>false</DocMerge>
</FaxRequest>
</xDoc>
</sendFax>
</soap:Body>
</soap:Envelope>