After defining your header classes, you need to specify which Web methods will use these headers. First, you declare public member variables of the types of headers you want to use. For example, Listing 7.2 shows a Web service with two member variables: one of type HeaderClass1 and one of type HeaderClass2. Note that the member variables must be public.
Public Class DataService Inherits System.Web.Services.WebService 'header fields must be public Public inputHeader As HeaderClass1 Public outputHeader As HeaderClass2 End Class
You add a SoapHeaderAttribute attribute to each Web method that ...