0
我希望客戶不必離開現場查看他們的跟蹤信息:(換句話說,他們可以從我的網站跟蹤他們的貨物)http://www.echo.com/ShipmentTracking/EchoShipmentTrack.aspx如何獲得SoapUI請求在網絡服務器上工作
我收到了API文檔,並且能夠成功地用SOAPUI測試遠程API。我發現它有幾種工具可以爲諸如Java之類的東西生成代碼。我查找了一個SoapUI到PHP的工具,但無法找到一個。我對PHP很陌生,任何人都可以提供如何將這個XML轉換爲我可以在Web服務器上執行的代碼的代碼?
WSDL鏈接:由SOAPUI產生http://api.echo.com/Echo.API.ShipmentStatus/ShipmentStatusService.svc?wsdl
樣品請求:
<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>[email protected]</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>