
620
|
Chapter 34: The System.Web.Services.Protocols Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Subclasses
SoapUnknownHeader
Returned By
SoapHeaderCollection.this
Passed To
SoapHeaderCollection.{Add( ), Contains( ), CopyTo( ), IndexOf( ), Insert( ), Remove( ), this}
SoapHeaderAttribute
System.Web.Services.Protocols (system.web.services.dll)
sealed class
This attribute is used to receive a custom SoapHeader. Before you can use this attribute,
you need to add a member variable of the appropriate SoapHeader type to your web
service or proxy class (for example, Public ReceivedHeader As MyCustomHeader). Before invoking
a method, the client will set this member to the appropriate header object. You must
also add a SoapHeaderAttribute to each method that wants to process the custom header.
This declaration specifies the class member that received the custom header object, as
in [SoapHeader(MemberName = "ReceivedHeader"].
If a method will process more than one SoapHeader, just add multiple SoapHeaderAttribute
declarations. You can also receive all headers that are not defined in the web service by
creating a member array of SoapUnknownHeader objects and using it in the SoapHeaderAttribute
declaration.
Hierarchy
System.Object ➝ System.Attribute ➝ SoapHeaderAttribute
Valid On
Method
SoapHeaderCollection
System.Web.Services.Protocols (system.web.services.dll) ...