Setup Requirements
To recreate this sample, you will need to download and
install the Microsoft SOAP Toolkit.
Sample Application Code
<%
strRequest = "<Create>" & _
"<UserID>Your User ID</UserID>" & _
"<Password>Your Password</Password>" & _
"<TestMode>Y</TestMode>" & _
"<AccountNumber>0123456</AccountNumber>"
' Optional Pickup Location Data, if you do not
' specify these properties then the location data
' will be retrieved from the Account Number.
strRequest = strRequest & _
"<CompanyName>TESTING NAME</CompanyName>" & _
"<Street>TESTING STREET</Street>" & _
"<Box>TESTING BOX</Box>" & _
"<City>LOS ANGELES</City>" & _
"<State>CA</State>" & _
"<Zipcode>90001</Zipcode>" & _
"<ContactName>TESTING CONTACT</ContactName>" & _
"<ContactPhone>1234567890</ContactPhone>" & _
"<PickupDate>2004-09-24</PickupDate>" & _
"<ReadyTime>13:00:00</ReadyTime>" & _
"<CloseTime>17:00:00</CloseTime>" & _
"<SpecialInstructions>0123456</SpecialInstructions>" & _
"<Details>" & _
"<DetailItem>" & _
"<DestinationZipcode>70364</DestinationZipcode>" & _
"<Pieces>5</Pieces>" & _
"<Package>SK</Package>" & _
"<Weight>100</Weight>" & _
"<Freezable>N</Freezable>" & _
"</DetailItem>" & _
"</Details>" & _
"</Create>"
Dim Code, Element, Fault, Message, PickupNumber, TerminalManager
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/pickup/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
PickupNumber = xml.SelectSingleNode("/Response/PickupNumber").Text
TerminalManager = xml.SelectSingleNode("/Response/PickupTerminal/Manager").Text
End If
End If
Set xml = Nothing
Set soap = Nothing
%>
<HTML>
<BODY>
Pickup Number = <% =PickupNumber %><br>
Terminal Manager = <% =TerminalManager %><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.