
SoapHeader | 619
Protocols
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
SoapExtensionAttribute
System.Web.Services.Protocols (system.web.services.dll)
abstract class
When using a SoapExtension, you must also derive a custom SoapExtensionAttribute. This
attribute is used to “connect” methods in your web service or proxy class to the corre-
sponding extension.
When creating a custom SoapExtensionAttribute, you need to override the ExtensionType prop-
erty so that it returns the type of your custom SoapExtension class. You can then use your
custom attribute to mark methods in your web service or proxy class. ASP.NET will
automatically use the specified SoapExtension when the associated method is invoked.
Hierarchy
System.Object ➝ System.Attribute ➝ SoapExtensionAttribute
Passed To
SoapExtension.GetInitializer( )
Valid On
All
SoapHeader
System.Web.Services.Protocols (system.web.services.dll)
abstract class
This class allows you to create custom SOAP headers, which are used to send addi-
tional information to or from a web service. For example, rather than require an extra
security parameter to authenticate every web service method, you could use a custom
SoapHeader. The client could then set a simple property of the proxy class, and the
header would be sent automatically with every web method request.
To use a custom SoapHeader,