O'Reilly logo

Inside Microsoft® Exchange Server 2007 Web Services by Huw Upshall, Mark Taylor, Ben Spain, Michael Mainer, David Sterling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Coding by Using Raw XML

Most consumers will bypass this option, but the most earthy and natural way to talk to Exchange Web Services is through raw SOAP+XML messages over HTTP. Well, natural for the Web service at least. There are any number of ways to do this, and we will show you one way here.

Knowing that Web service requests to Exchange Web Services are made via HTTP POST calls, the HttpWebRequest class in the System.Web namespace is your friend. Example 1-10 provides a general-purpose method for sending XML SOAP requests to Exchange Web Services.

Example 1-10. Sending raw SOAP over HTTP

/// <summary> /// Makes a raw soap request /// </summary> /// <param name="url">URL of server to talk to</param> /// <param name="userName">UserName</param> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required