Question

I would like it so customers don't have to travel off site to see their tracking info:(In other words they can track their shipment from my website) http://www.echo.com/ShipmentTracking/EchoShipmentTrack.aspx

I received the API documentation and I was able to test a remote API with SOAPUI successfully. I see that it has several tools to generating code for things like Java. I looked for a SoapUI to PHP tool but was unable to find one. I'm very new to PHP, could anyone give the code of how I could translate this XML into something that I could execute on a web server?

WSDL link: http://api.echo.com/Echo.API.ShipmentStatus/ShipmentStatusService.svc?wsdl

Sample Request generated by 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>
Was it helpful?

Solution

This question already have a solutions at stackoverflow. Look at this answers:

https://stackoverflow.com/a/10505172/2324993

https://stackoverflow.com/a/1656763/2324993

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top