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.1. Defining SOAP Headers

The first step in using SOAP headers is to define a class that represents the header you want to send or receive. This class must inherit from the base class System.Web.Services.Protocols.SoapHeader and add public members that represent the header information you need. Listing 7.1 shows two classes that represent two different SOAP headers, each with two public fields.

Listing 7.1. Two SOAP header classes (VBWSBook\Chapter7\DataService.asmx.vb)
Public Class HeaderClass1
    Inherits SoapHeader
    Public field1 As Integer
    Public field2 As String
End Class
Public Class HeaderClass2
    Inherits SoapHeader
    Public fielda As Integer
    Public fieldb As String
End Class

Because your SOAP headers are simply classes, they can also contain ...

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