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
{
	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)
		{
			System.Text.StringBuilder request = new System.Text.StringBuilder();

			request.Append("<Create>");

			request.Append("<UserID>Your User ID</UserID>");
			request.Append("<Password>Your Password</Password>");
			request.Append("<TestMode>Y</TestMode>");

			request.Append("<AccountNumber>0123456</AccountNumber>");

			/* Optional Pickup Location Data, if you do not
			 * specify these properties then the location data
			 * will be use from the Account Number.
			 *
			request.Append("<CompanyName>TESTING NAME</CompanyName>");
			request.Append("<Street>TESTING STREET</Street>");
			request.Append("<Box>TESTING BOX</Box>");
			request.Append("<City>LOS ANGELES</City>");
			request.Append("<State>CA</State>>");
			request.Append("<Zipcode>90001</Zipcode>");
			*/

			request.Append("<ContactName>TESTING CONTACT</ContactName>");
			request.Append("<ContactPhone>1234567890</ContactPhone>");

			request.Append("<PickupDate>2004-09-24</PickupDate>");
			request.Append("<ReadyTime>13:00:00</ReadyTime>");
			request.Append("<CloseTime>17:00:00</CloseTime>");
			request.Append("<SpecialInstructions>TESTING SPECIAL INSTRUCTIONS</SpecialInstructions>");
		

			request.Append("<Details>");

			request.Append("<DetailItem>");
			request.Append("<DestinationZipcode>70364</DestinationZipcode>");
			request.Append("<Pieces>5</Pieces>");
			request.Append("<Package>SK</Package>");
			request.Append("<Weight>100</Weight>");
			request.Append("<Freezable>N</Freezable>");
			request.Append("</DetailItem>");

			request.Append("</Details>");

			request.Append("</Create>");

			try
			{
				System.Net.HttpWebRequest http = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://www.saiasecure.com/webservice/pickup/xml.aspx");
				http.Method = "POST";
				http.ContentLength = request.ToString().Length;
				http.ContentType = "text/xml";
				System.IO.StreamWriter sw = new System.IO.StreamWriter(http.GetRequestStream());
				sw.Write(request.ToString());
				sw.Close();
				
				string response;
				System.Net.HttpWebResponse httpResponse = (System.Net.HttpWebResponse)http.GetResponse();
				using (System.IO.StreamReader sr = new System.IO.StreamReader(httpResponse.GetResponseStream()))
				{
					response = sr.ReadToEnd();
					sr.Close();
				}

				System.Xml.XmlDocument xmlResponse = new System.Xml.XmlDocument();
				xmlResponse.LoadXml(response);

				// 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. 

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

					this.ResponseCode.Text = xmlResponse.SelectSingleNode("/Response/Code").InnerText;
					this.Element.Text = xmlResponse.SelectSingleNode("/Response/Element").InnerText;
					this.Fault.Text = xmlResponse.SelectSingleNode("/Response/Fault").InnerText;
					this.Message.Text = xmlResponse.SelectSingleNode("/Response/Message").InnerText;
				}
				else
				{
					this.PickupNumber.Text = xmlResponse.SelectSingleNode("/Response/PickupNumber").InnerText;
					this.TerminalManager.Text = xmlResponse.SelectSingleNode("/Response/PickupTerminal/Manager").InnerText;
				}
			}
			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);
		}
		
		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.