O'Reilly logo

Real World XML Web Services: For VB and VB .NET Developers by Yasser Shohoud

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

7.3. Using Headers on the Client

When you add a Web reference to a Web service that uses SOAP headers, the generated code contains a class for each SOAP header defined in the Web service. Listing 7.4 shows an example proxy class for the above service. To improve readability, I removed all attributes and other code not relevant to this discussion.

Listing 7.4. An example proxy class that calls a Web service with SOAP headers (VBWSClientCode\Chapter7\CustomClient\Web References\VBWSServer1\Reference.vb)
 Public Class DataService Inherits SoapHttpClientProtocol Public HeaderClass1Value As HeaderClass1 Public HeaderClass2Value As HeaderClass2 <SoapHeaderAttribute("HeaderClass2Value", _ Direction:=SoapHeaderDirection.Out)> _ Public Sub ReturnHeader() ...

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