Setup Requirements
To recreate this sample, make a new VB ASP.NET application within Visual Studio.NET.
Then right click References in the Solution Explorer and select Add Web Reference.
Then type http://www.saiasecure.com/webservice/pickup/soap.asmx for the URL and click the Go
icon on the right. You should then see a list of methods in the window below. Next
change the Web Reference Name to "Saia.Pickup" and click Add Reference.
Sample Application Code
Public Class WebForm1
Inherits System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
Private Sub InitializeComponent()
End Sub
Protected WithEvents Element As System.Web.UI.WebControls.Label
Protected WithEvents Label3 As System.Web.UI.WebControls.Label
Protected WithEvents Label1 As System.Web.UI.WebControls.Label
Protected WithEvents Label2 As System.Web.UI.WebControls.Label
Protected WithEvents TerminalManager As System.Web.UI.WebControls.Label
Protected WithEvents ResponseCode As System.Web.UI.WebControls.Label
Protected WithEvents Label5 As System.Web.UI.WebControls.Label
Protected WithEvents Fault As System.Web.UI.WebControls.Label
Protected WithEvents Label7 As System.Web.UI.WebControls.Label
Protected WithEvents Message As System.Web.UI.WebControls.Label
Protected WithEvents Label9 As System.Web.UI.WebControls.Label
Protected WithEvents PickupNumber As System.Web.UI.WebControls.Label
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim pickup As Saia.Pickup.Pickup = New Saia.Pickup.Pickup
Dim request As Saia.Pickup.Create = New Saia.Pickup.Create
request.UserID = "Your User ID"
request.Password = "Your Password"
request.TestMode = "Y"
request.AccountNumber = "0123456"
' Optional Pickup Location Data, if you do not
' specify these properties then the location data
' will be use from the Account Number.
'
'request.CompanyName = "TESTING NAME"
'request.Street = "TESTING STREET"
'request.Box = "TESTING BOX"
'request.City = "LOS ANGELES"
'request.State = "CA"
'request.Zipcode = "90001"
'
request.ContactName = "TESTING CONTACT"
request.ContactPhone = 1234567890
request.PickupDate = "2004-09-24"
request.ReadyTime = "13:00:00"
request.CloseTime = "17:00:00"
request.SpecialInstructions = "TESTING SPECIAL INSTRUCTIONS"
Dim details(0) As Saia.Pickup.DetailItem
details(0) = New Saia.Pickup.DetailItem
details(0).DestinationZipcode = "70364"
details(0).Pieces = 5
details(0).Package = "SK"
details(0).Weight = 100
details(0).Freezable = "N"
request.Details = details
Try
Dim response As Saia.Pickup.Response = pickup.Create(request)
If response.Code <> "" Then
' Add error handling code in case Saia responds
' with an Error Code
Me.ResponseCode.Text = response.Code
Me.Element.Text = response.Element
Me.Fault.Text = response.Fault
Me.Message.Text = response.Message
Else
Me.PickupNumber.Text = response.PickupNumber.ToString
Me.TerminalManager.Text = response.PickupTerminal.Manager
End If
Catch
' Add error handling code in case your unable to connect
' to the Saia Website.
End Try
End Sub
End Class
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.