
618
|
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.
Hierarchy
System.Object ➝ System.Exception(System.Runtime.Serialization.ISerializable) ➝ System.
SystemException
➝ SoapException
Subclasses
SoapHeaderException
Returned By
SoapMessage.Exception
SoapExtension
System.Web.Services.Protocols (system.web.services.dll)
abstract class
You can inherit from this class to create a custom SOAP extension, which allows you
to access and manipulate SOAP messages before they are sent or converted into
objects. SOAP extensions can be used to implement additional encryption, compres-
sion, or tracing. They can also be applied to web services or web service clients.
The key to using a derived SoapExtension class is overriding the ProcessMessage( ) method.
This method is called automatically by the ASP.NET framework at several different
SoapMessageStages and provides you with the current SoapMessage object. You also connect
your SoapExtension to a proxy class or web service method by using a custom
SoapExtensionAttribute.
You can initialize a SoapExtension with a constructor method and the Initialize( ) and
GetInitializer( ) methods. The GetInitializer( ) method is called only once (the first time a
SOAP request is made). It gives you the opportunity to retrieve information about the
web service or