SoapMessageStage SoapMessageStage SoapMessageStage SoapMessageStage Enum

Definition

Specifies the processing stage of a SOAP message.

public enum class SoapMessageStage
public enum SoapMessageStage
type SoapMessageStage = 
Public Enum SoapMessageStage
Inheritance
SoapMessageStageSoapMessageStageSoapMessageStageSoapMessageStage

Fields

AfterDeserialize AfterDeserialize AfterDeserialize AfterDeserialize 8

The stage just after a SoapMessage is deserialized from a SOAP message into an object.

AfterSerialize AfterSerialize AfterSerialize AfterSerialize 2

The stage just after a SoapMessage is serialized, but before the SOAP message is sent over the wire.

BeforeDeserialize BeforeDeserialize BeforeDeserialize BeforeDeserialize 4

The stage just before a SoapMessage is deserialized from the SOAP message sent across the network into an object.

BeforeSerialize BeforeSerialize BeforeSerialize BeforeSerialize 1

The stage just prior to a SoapMessage being serialized.

Examples

The following code example is a fragment of a SOAP extension, which implements the ProcessMessage method. Within the ProcessMessage method, processing of a SoapMessage is handled specific to the SoapMessageStage.

// Process the SOAP message received and write to log file.
void ProcessMessage( SoapMessage^ message )
{
   switch ( message->Stage )
   {
      case SoapMessageStage::BeforeSerialize:
         break;
      case SoapMessageStage::AfterSerialize:
         WriteOutput( message );
         break;
      case SoapMessageStage::BeforeDeserialize:
         WriteInput( message );
         break;
      case SoapMessageStage::AfterDeserialize:
         break;
      default:
         throw gcnew Exception( "invalid stage" );
   }
}
// Process the SOAP message received and write to log file.
public override void ProcessMessage(SoapMessage message) 
{
   switch (message.Stage) 
   {
      case SoapMessageStage.BeforeSerialize:
         break;
      case SoapMessageStage.AfterSerialize:
         WriteOutput( message );
         break;
      case SoapMessageStage.BeforeDeserialize:
         WriteInput( message );
         break;
      case SoapMessageStage.AfterDeserialize:
         break;
      default:
         throw new Exception("invalid stage");
   }
}
  ' Process the SOAP message received and write to log file.
  Public Overrides Sub ProcessMessage(message As SoapMessage)
     Select Case message.Stage
        Case SoapMessageStage.BeforeSerialize
        Case SoapMessageStage.AfterSerialize
           WriteOutput(message)
        Case SoapMessageStage.BeforeDeserialize
           WriteInput(message)
        Case SoapMessageStage.AfterDeserialize
        Case Else
              Throw New Exception("invalid stage")
     End Select
End Sub 'ProcessMessage

Remarks

ASP.NET provides an extensibility mechanism for calling Web Services using SOAP. The extensibility mechanism revolves around a SoapExtension that can inspect or modify a message at specific stages in message processing on either the client or the server. This enumeration specifies the processing stage of the SoapMessage.

Applies to

See also