SoapMessage.Stream Eigenschaft

Definition

Ruft die Daten ab, die die SOAP-Anforderung oder die SOAP-Antwort in Form eines Stream darstellen.Gets the data representing the SOAP request or SOAP response in the form of a Stream.

public:
 property System::IO::Stream ^ Stream { System::IO::Stream ^ get(); };
public System.IO.Stream Stream { get; }
member this.Stream : System.IO.Stream
Public ReadOnly Property Stream As Stream

Eigenschaftswert

Eine schreibgeschützte Instanz der Stream-Klasse.A read-only instance of the Stream class.

Beispiele

   // Write the contents of the incoming SOAP message to the log file.
public:
   void WriteInputBeforeDeserialize( SoapMessage^ myMessage )
   {
      Copy( myOldStream, myNewStream );
      FileStream^ myFileStream =
         gcnew FileStream( myFileName, FileMode::Append, FileAccess::Write );
      StreamWriter^ myStreamWriter = gcnew StreamWriter( myFileStream );
      myStreamWriter->WriteLine(
         "---------------------------------- Response at {0}", DateTime::Now );
      Stream^ myStream = myMessage->Stream;
      myStreamWriter->Write( "Length of data in the current response: " );
      myStreamWriter->WriteLine( myStream->Length );
      myStreamWriter->Flush();
      myNewStream->Position = 0;
      Copy( myNewStream, myFileStream );
      myStreamWriter->Close();
      myFileStream->Close();
      myNewStream->Position = 0;
   }
// Write the contents of the incoming SOAP message to the log file.
public void WriteInputBeforeDeserialize(SoapMessage myMessage)
{
   Copy(myOldStream, myNewStream);
   FileStream myFileStream = 
      new FileStream(myFileName, FileMode.Append, FileAccess.Write);
   StreamWriter myStreamWriter = new StreamWriter(myFileStream);
   myStreamWriter.WriteLine(
      "---------------------------------- Response at " + DateTime.Now);     
   Stream myStream = myMessage.Stream;
   myStreamWriter.Write("Length of data in the current response: ");
   myStreamWriter.WriteLine(myStream.Length);
   myStreamWriter.Flush();
   myNewStream.Position = 0;
   Copy(myNewStream, myFileStream);
   myStreamWriter.Close();
   myFileStream.Close();
   myNewStream.Position = 0;
}
' Write the contents of the incoming SOAP message to the log file.
Public Sub WriteInputBeforeDeserialize(myMessage As SoapMessage)
   Copy(myOldStream, myNewStream)
   Dim myFileStream As _
      New FileStream(myFileName, FileMode.Append, FileAccess.Write)
   Dim myStreamWriter As New StreamWriter(myFileStream)
   myStreamWriter.WriteLine( _
      "---------------------------------- Response at " + DateTime.Now)
   Dim myStream As Stream = myMessage.Stream
   myStreamWriter.Write("Length of data in the current response: ")
   myStreamWriter.WriteLine(myStream.Length)
   myStreamWriter.Flush()
   myNewStream.Position = 0
   Copy(myNewStream, myFileStream)
   myStreamWriter.Close()
   myFileStream.Close()
   myNewStream.Position = 0
End Sub

Hinweise

SOAP-Erweiterungen, die die Daten untersuchen, die eine SOAP-Anforderung oder SOAP-Antwort darstellen (z Stream SoapMessageStage. b. eine Protokollierungs-SOAP-Erweiterung), können die-Eigenschaft verwenden, um die DatenSOAP extensions that inspect the data representing a SOAP request or SOAP response, such as a logging SOAP extension, can use the Stream property to view the data at each SoapMessageStage.

SOAP-Erweiterungen, die die Daten ändern, die eine SOAP-Anforderung oder SOAP-Antwort darstellen, wie z. b. Verschlüsselungs- Stream oder Komprimierungs ChainStream -SOAP SoapExtension-Erweiterungen, sollten dies mit dem an die-Methode vonSOAP extensions that modify the data representing a SOAP request or SOAP response, such as encryption or compression SOAP extensions, should do so with the Stream passed into the ChainStream method of SoapExtension. Die Stream -Eigenschaft SoapMessage von, ProcessMessage die an weitergegeben wird, ist schreibgeschützt.The Stream property of SoapMessage passed into ProcessMessage is read-only.

Weitere Informationen zum Ändern der Daten, die eine SOAP-Anforderung oder SOAP-Antwort ChainStreamdarstellen, finden Sie unter.For more information on modifying the data representing a SOAP request or SOAP response, see ChainStream.

Gilt für: