Setup Requirements
To recreate this sample, you will need to download and
install the Microsoft SOAP Toolkit.
Sample Application Code
<%
strRequest = "<GetByProNumber>" & _
"<UserID>Your User ID</UserID>" & _
"<Password>Your Password</Password>" & _
"<TestMode>Y</TestMode>" & _
"<ProNumber>463510000</ProNumber>" & _
"</GetByProNumber>"
' Below are examples of the other tracing request documents.
'strRequest = "<GetByBLNumber>" & _
' "<UserID>Your User ID</UserID>" & _
' "<Password>Your Password</Password>" & _
' "<TestMode>Y</TestMode>" & _
' "<BLNumber>12345</BLNumber>" & _
' "<OriginZipcode>38101</OriginZipcode>" & _
' "<DestinationZipcode>70364</DestinationZipcode>" & _
' "</GetByBLNumber>"
'strRequest = "<GetByPONumber>" & _
' "<UserID>Your User ID</UserID>" & _
' "<Password>Your Password</Password>" & _
' "<TestMode>Y</TestMode>" & _
' "<PONumber>12345</PONumber>" & _
' "<OriginZipcode>38101</OriginZipcode>" & _
' "<DestinationZipcode>70364</DestinationZipcode>" & _
' "</GetByPONumber>"
'strRequest = "<GetByShipperNumber>" & _
' "<UserID>Your User ID</UserID>" & _
' "<Password>Your Password</Password>" & _
' "<TestMode>Y</TestMode>" & _
' "<ShipperNumber>12345</ShipperNumber>" & _
' "<OriginZipcode>38101</OriginZipcode>" & _
' "<DestinationZipcode>70364</DestinationZipcode>" & _
' "</GetByShipperNumber>"
'strRequest = "<GetByPartnerNumber>" & _
' "<UserID>Your User ID</UserID>" & _
' "<Password>Your Password</Password>" & _
' "<TestMode>Y</TestMode>" & _
' "<PartnerSCAC>VITR</PartnerSCAC>" & _
' "<PartnerNumber>123456789</PartnerNumber>" & _
' "</GetByPartnerNumber>"
Dim Code, Element, Fault, Message, CurrentStatus, ConsigneeName, Description1
Set soap = Server.CreateObject("MSSOAP.SoapClient30")
Set xml = Server.CreateObject("MSXML2.DOMDocument")
On Error Resume Next
soap.ClientProperty("ServerHTTPRequest") = True
soap.mssoapinit "http://www.saiasecure.com/webservice/shipment/soap.asmx?wsdl", "", "", ""
strResponse = soap.ProcessXML(strRequest)
If Err <> 0 Then
' Add error handling code in case your unable to connect to the Saia Website.
Else
xml.LoadXml strResponse
' Note: These examples use SelectSingleNode() which accepts a string containing a XPath
' expression. This is a common way to retrieve a node from a small XML Document.
Code = xml.SelectSingleNode("/Response/Code").Text
If Code <> "" Then
' Add error handling code in case Saia responds with an Error Code
Element = xml.SelectSingleNode("/Response/Element").Text
Fault = xml.SelectSingleNode("/Response/Fault").Text
Message = xml.SelectSingleNode("/Response/Message").Text
Else
CurrentStatus = xml.SelectSingleNode("/Response/CurrentStatus").Text
ConsigneeName = xml.SelectSingleNode("/Response/Consignee/Name").Text
' Below is a sample of how to retrieve an array
' using XPath and XML with SelectNodes().
Set Details = xml.SelectNodes("/Response/Details/DetailItem")
For Each DetailItem In Details
Description1 = DetailItem.SelectSingleNode("Description").Text
Exit For
Next
End If
End If
Set xml = Nothing
Set soap = Nothing
%>
<HTML>
<BODY>
Current Status = <% =CurrentStatus %><br>
Consignee Name = <% =ConsigneeName %><br>
Description 1 = <% =Description1 %><br>
<br>
Code = <% =Code %><br>
Element = <% =Element %><br>
Fault = <% =Fault %><br>
Message = <% =Message %><br>
</BODY>
</HTML>
Disclaimer:
Saia Inc. authorizes the use of these Web Services solely to facilitate the exchange of information between Saia and the customer. Unauthorized use of Saia, Inc. Web Services and information is strictly prohibited. All services may be used for lawful purposes only. No warranty, express or implied, is given relating to the accuracy of content and Saia, Inc. does not accept any liability for error or omission.
Saia Inc. reserves the right to refuse or cancel these services at it’s sole discretion. If any terms or conditions are failed to be followed, results constitute grounds for immediate account deactivation.