Setup Requirements

To recreate this sample, make a new C# 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

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace CS
{
	/// 
	/// Summary description for WebForm1.
	/// 
	public class WebForm1 : System.Web.UI.Page
	{
		protected System.Web.UI.WebControls.Label PickupNumber;
		protected System.Web.UI.WebControls.Label Label2;
		protected System.Web.UI.WebControls.Label Label1;
		protected System.Web.UI.WebControls.Label TerminalManager;
		protected System.Web.UI.WebControls.Label Label3;
		protected System.Web.UI.WebControls.Label Element;
		protected System.Web.UI.WebControls.Label ResponseCode;
		protected System.Web.UI.WebControls.Label Label5;
		protected System.Web.UI.WebControls.Label Fault;
		protected System.Web.UI.WebControls.Label Label7;
		protected System.Web.UI.WebControls.Label Message;
		protected System.Web.UI.WebControls.Label Label9;
	
		private void Page_Load(object sender, System.EventArgs e)
		{
			Saia.Pickup.Pickup pickup = new Saia.Pickup.Pickup();
			Saia.Pickup.Create request = 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 retrieved 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";
		
			request.Details = new Saia.Pickup.DetailItem[1];

			request.Details[0] = new Saia.Pickup.DetailItem();
			request.Details[0].DestinationZipcode = "70364";
			request.Details[0].Pieces = 5;
			request.Details[0].Package = "SK";
			request.Details[0].Weight = 100;
			request.Details[0].Freezable = "N";
			
			try
			{
				Saia.Pickup.Response response = pickup.Create(request);

				if (response.Code != "")
				{
					// Add error handling code in case Saia responds 
					// with an Error Code

					this.ResponseCode.Text = response.Code;
					this.Element.Text = response.Element;
					this.Fault.Text = response.Fault;
					this.Message.Text = response.Message;
				}
				else
				{
					this.PickupNumber.Text = response.PickupNumber.ToString();
					this.TerminalManager.Text = response.PickupTerminal.Manager;
				}
			}
			catch
			{
				// Add error handling code in case your unable to connect 
				// to the Saia Website.
			}
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// 
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// 
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion
	}
}

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.