Professional in C# and Visual Basic Part 140. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS. . | Chapter 29 Building and Consuming Services In this example the SoapHeader attribute takes a string value of the name of the instantiated SoapHeader class in this case myHeader. From here the WebMethod actually makes use of the myHeader object. If the myHeader object is not found meaning that the client did not send in a SOAP header with his constructed SOAP message a simple Hello World is returned. However if values are provided in the SOAP header of the SOAP request those values are used within the returned string value. Consuming a Web Service Using SOAP Headers It really is not difficult to build an application that makes a SOAP request to a Web service using SOAP headers. Just as with the Web services that do not include SOAP headers you make a Web Reference to the remote Web service directly in Visual Studio. For the page create a simple page with a single Label control. The output of the Web service is placed in the Label control. The code for the page is shown in Listing 29-19. Listing 29-19 An page working with an XML Web service using SOAP headers VB @ Page Language VB script runat server Protected Sub Page_Load ByVal sender As Object ByVal e As Dim ws As New Dim wsHeader As New Bill Evjen Bubbles wsHeader End Sub script html xmlns http 1999 xhtml head runat server title Working with SOAP headers title head body form id form1 runat server div asp Label ID Label1 Runat server asp Label div form body html C @ Page Language C script runat server Continued 1353 Chapter 29 Building and Consuming Services protected void Page_Load object sender e ws new wsHeader new Bill Evjen Bubbles wsHeader .