我正在向 SOAP API 发送请求,不幸的是,我对 SOAP 的了解有限。以下两个请求都返回响应,但响应不同。不工作的例子只返回一个 send_fax_response。工作返回一个 send_fax_response 和一个 send_fax_result。关于为什么的任何想法?会不会是订单?
不工作
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>
在职的
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>