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.
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 ...