System.Web.Services.Protocols.SoapExtension.ChainStream Method

When overridden in a derived class, allows a SOAP extension access to the memory buffer containing the SOAP request or response.

Syntax

public virtual System.IO.Stream ChainStream (System.IO.Stream stream)

Parameters

stream
A memory buffer containing the SOAP request or response.

Returns

A System.IO.Stream representing a new memory buffer that this SOAP extension can modify.

Remarks

SoapExtension.ChainStream(System.IO.Stream) ensures that SOAP extensions with the highest priority can modify the actual data closest to the SOAP message sent or returned over the wire.

SOAP extensions should save references of the System.IO.Stream passed into SoapExtension.ChainStream(System.IO.Stream) and the System.IO.Stream returned from SoapExtension.ChainStream(System.IO.Stream). If the SOAP extension is configured to run with a XML Web service method, the System.IO.Stream passed into SoapExtension.ChainStream(System.IO.Stream) contains the serialized SOAP request at the SoapMessageStage.BeforeDeserialize System.Web.Services.Protocols.SoapMessageStage. Similarily, the System.IO.Stream reference returned from SoapExtension.ChainStream(System.IO.Stream) is written into when the serialization occurs and thus contains the serialized SOAP response in the SoapMessageStage.AfterSerialize System.Web.Services.Protocols.SoapMessageStage.

Requirements

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in System.Web.Services.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0