Wednesday, November 30, 2022
Code Search
Code Bank
.NET Applications
XSD Schema Generator
.NET/XML Training


Using SOAP Headers in .NET

SOAP Headers can play an important role in SOAP messages. Using headers is as easy as creating a custom class that derives from the SoapHeader class, referencing the custom class in the Web Service, and then adding the header to a Web Method by using the SoapHeaderAttribute class. On the consumer/client-side, very little code is required to add a SOAP header into a request. The proxy object will do the majority of the work to add header details into SOAP messages. By using headers you can separate data that is used by the Web Service but not directly related to functionality exposed by a given Web Method.

This sample application shows how to use SOAP headers to create a custom authentication scheme. After a user logs into a service with a user name and password, the Web Service returns a unique authentication token which is then sent by the service consumer as a header in subsequent SOAP messages.

Teaches Web Services, SOAP Headers
Requirements .NET 1.0
Example: Click Here
View Source Code: Click Here
Download Code: Click Here


.NET, SharePoint and Silverlight Training Solutions
    Online, Onsite and Video Training on .NET and SharePoint technologies available through The Wahlin Group.

© 2007 Wahlin Consulting LLC
XML for ASP.NET Developers in bookstores