Example Requests and Responses |
[This is preliminary documentation and is subject to change.]
The Sample Request section contains a sample SOAP request message which consists of a SOAP header and a SOAP body, and the related response from the server.
This example of a request SOAP header was created with soapUI, the layout generated by another framework may be significantly different. Using soapUI for testing is highly recommended in part because it facilitates rapid troubleshooting of problematic requests.
The Content-Length will be the length of the SOAP envelope portion of the request. Your User-Agent string will likely be different, but it is ignored by the server.
POST http://sandbox.purolatorshipping.com/WebServices/ShippingServicesV3.asmx HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/soap+xml;charset=UTF-8;action="http://PurolatorServices.com/GetOrderStatus" User-Agent: Jakarta Commons-HttpClient/3.1 Host: support.pclusa.com Content-Length: 497
This is a typical SOAP envelope portion of a request.
![]() |
---|
If you remove the pur: prefix from the nodes in the body you must also change xmlns:pur to xmlns to avoid unpredictable results when parsing the request. |
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:pur="http://PurolatorServices.com/"> <soap:Header/> <soap:Body> <pur:GetOrderStatus> <pur:credentials> <pur:UserName>TestUser</pur:UserName> <pur:Password>5VJrtqTa</pur:Password> <pur:ClientID>0000000</pur:ClientID> </pur:credentials> <pur:orderNumber>Nonexistent Order</pur:orderNumber> </pur:GetOrderStatus> </soap:Body> </soap:Envelope>
This is a SOAP envelope from a typical response from the server.
This response indicates that the order specified in the request does not exist.
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetOrderStatusResponse xmlns="http://PurolatorServices.com/"> <GetOrderStatusResult> <Status>2</Status> <Messages> <ResponseMessage> <Number>11</Number> <Severity>2</Severity> <Message>Invalid shipment order number: Nonexistent Order.</Message> </ResponseMessage> </Messages> <TotalShipping>0</TotalShipping> </GetOrderStatusResult> </GetOrderStatusResponse> </soap:Body> </soap:Envelope>
A request with an "empty" body:
POST http://sandbox.purolatorshipping.com/WebServices/ShippingServicesV3.asmx HTTP/1.1 Accept-Encoding: gzip,deflate Content-Type: application/soap+xml;charset=UTF-8;action="http://PurolatorServices.com/GetOrderStatus" User-Agent: Jakarta Commons-HttpClient/3.1 Host: support.pclusa.com Content-Length: 103 <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Body/> </soap:Envelope>
The corresponding response:
HTTP/1.1 200 OK Cache-Control: private, max-age=0 Content-Type: application/soap+xml; charset=utf-8 Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET Date: Mon, 30 Jan 2012 16:16:38 GMT Content-Length: 561 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetOrderStatusResponse xmlns="http://PurolatorServices.com/"><GetOrderStatusResult><Status>2</Status><Messages><ResponseMessage><Number>1</Number><Severity>2</Severity><Message>Invalid credentials.</Message></ResponseMessage></Messages><TotalShipping>0</TotalShipping></GetOrderStatusResult></GetOrderStatusResponse></soap:Body></soap:Envelope>