我希望这样客户不必离开现场即可查看他们的跟踪信息:(换句话说,他们可以从我的网站跟踪他们的货物)http://www.echo.com/ShipmentTracking/EchoShipmentTrack.aspx
我收到了 API 文档,并且能够成功地使用 SOAPUI 测试远程 API。我看到它有几个工具可以为 Java 之类的东西生成代码。我寻找了一个 SoapUI to PHP 工具,但找不到。我对 PHP 很陌生,谁能提供我如何将这个 XML 转换为我可以在 Web 服务器上执行的东西的代码?
WSDL 链接:http ://api.echo.com/Echo.API.ShipmentStatus/ShipmentStatusService.svc?wsdl
SOAPUI 生成的示例请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://api.echo.com/shipmentstatus/contracts/2012/02/" xmlns:ns1="http://api.echo.com/common/schemas/2012/02/" xmlns:ns2="http://api.echo.com/shipmentstatus/schemas/2012/02/">
<soapenv:Header/>
<soapenv:Body>
<ns:GetStatus>
<ns:getStatusRequest>
<ns1:UserCredentials>
<ns1:APIKey>------REMOVED-----</ns1:APIKey>
</ns1:UserCredentials>
<ns2:BatchProcessingOptions>
<ns1:NotificationOptions>
<ns1:NotifyByEmail>false</ns1:NotifyByEmail>
<ns1:NotifyEmail>dchol@echo.com</ns1:NotifyEmail>
</ns1:NotificationOptions>
<ns1:ShouldPartialProcessBatch>false</ns1:ShouldPartialProcessBatch>
<ns2:CostResultFormat>DETAIL</ns2:CostResultFormat>
<ns2:IncludeCostDetails>false</ns2:IncludeCostDetails>
<ns2:StatusResultFormat>DETAIL</ns2:StatusResultFormat>
</ns2:BatchProcessingOptions>
<ns2:ShipmentIdentifiers>
<ns1:ShipmentIdentifier>
<ns1:ShipmentAccountNumber>E9704</ns1:ShipmentAccountNumber>
<ns1:ShipmentNumber>17596853</ns1:ShipmentNumber>
</ns1:ShipmentIdentifier>
</ns2:ShipmentIdentifiers>
</ns:getStatusRequest>
</ns:GetStatus>
</soapenv:Body>
</soapenv:Envelope>