SoapMessage.Stream プロパティ

定義

Stream の形式で SOAP 要求または SOAP 応答を表しているデータを取得します。

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

プロパティ値

Stream クラスの読み取り専用インスタンス。

   // 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

注釈

SOAP 要求または SOAP 応答を表すデータ (ログ記録 SOAP 拡張機能など) を検査する SOAP 拡張機能では、 プロパティを Stream 使用して、各 SoapMessageStageでデータを表示できます。

SOAP 要求または SOAP 応答を表すデータ (暗号化や圧縮 SOAP 拡張機能など) を変更する SOAP 拡張機能は、 の SoapExtensionメソッドに渡された を使用してChainStreamStream行う必要があります。 StreamProcessMessage渡される の SoapMessage プロパティは読み取り専用です。

SOAP 要求または SOAP 応答を表すデータの変更の詳細については、「」を参照してください ChainStream

適用対象