LogicalMethodInfo クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


LogicalMethodInfo は主として SOAP 拡張機能で使用し、SOAP 拡張機能を実行するように設定した XML Web サービス メソッドの詳細を調査します。SOAP 拡張機能の設定により、LogicalMethodInfo を取り込む SoapExtension の GetInitializer メソッド内の XML Web サービス メソッドの詳細を調べます。LogicalMethodInfo は、Parameters プロパティ、および GetCustomAttributes プロパティを使用して XML Web サービス メソッドに適用されたカスタム属性にアクセスすることにより XML Web サービス メソッドのパラメータなどの詳細を提供します。
SOAP 拡張機能の詳細については SoapExtension クラスのトピックまたは「SOAP 拡張機能を使用した SOAP メッセージの変更」を参照してください。

' 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(CType(message, SoapServerMessage)) Case SoapMessageStage.BeforeDeserialize WriteInput(CType(message, SoapServerMessage)) Case SoapMessageStage.AfterDeserialize Case Else Throw New Exception("invalid stage") End Select End Sub 'ProcessMessage ' Write the contents of the incoming SOAP message to the log file. Public Sub WriteInput(message As SoapServerMessage) ' Utility method to copy the contents of one stream to another. Copy(oldStream, newStream) Dim myFileStream As New FileStream(filename, FileMode.Append, FileAccess.Write) Dim myStreamWriter As New StreamWriter(myFileStream) myStreamWriter.WriteLine("================================== Request at " + _ DateTime.Now) myStreamWriter.WriteLine("The method that has been invoked is : ") myStreamWriter.WriteLine(ControlChars.Tab + message.MethodInfo.Name) myStreamWriter.WriteLine("The contents of the SOAP envelope are : ") myStreamWriter.Flush() newStream.Position = 0 Copy(newStream, myFileStream) myFileStream.Close() newStream.Position = 0 End Sub 'WriteInput ' Write the contents of the outgoing SOAP message to the log file. Public Sub WriteOutput(message As SoapServerMessage) newStream.Position = 0 Dim myFileStream As New FileStream(filename, FileMode.Append, FileAccess.Write) Dim myStreamWriter As New StreamWriter(myFileStream) myStreamWriter.WriteLine("---------------------------------- Response at " + _ DateTime.Now) myStreamWriter.Flush() ' Utility method to copy the contents of one stream to another. Copy(newStream, myFileStream) myFileStream.Close() newStream.Position = 0 Copy(newStream, oldStream) End Sub 'WriteOutput
// 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((SoapServerMessage)message); break; case SoapMessageStage.BeforeDeserialize: WriteInput((SoapServerMessage)message); break; case SoapMessageStage.AfterDeserialize: break; default: throw new Exception("invalid stage"); } } // Write the contents of the incoming SOAP message to the log file. public void WriteInput(SoapServerMessage message) { // Utility method to copy the contents of one stream to another. Copy(oldStream, newStream); FileStream myFileStream = new FileStream(filename, FileMode.Append, FileAccess.Write); StreamWriter myStreamWriter = new StreamWriter(myFileStream); myStreamWriter.WriteLine("================================== Request at " + DateTime.Now); myStreamWriter.WriteLine("The method that has been invoked is : "); myStreamWriter.WriteLine("\t" + message.MethodInfo.Name); myStreamWriter.WriteLine("The contents of the SOAP envelope are : "); myStreamWriter.Flush(); newStream.Position = 0; Copy(newStream, myFileStream); myFileStream.Close(); newStream.Position = 0; } // Write the contents of the outgoing SOAP message to the log file. public void WriteOutput(SoapServerMessage message) { newStream.Position = 0; FileStream myFileStream = new FileStream(filename, FileMode.Append, FileAccess.Write); StreamWriter myStreamWriter = new StreamWriter(myFileStream); myStreamWriter.WriteLine("---------------------------------- Response at " + DateTime.Now); myStreamWriter.Flush(); // Utility method to copy the contents of one stream to another. Copy(newStream, myFileStream); myFileStream.Close(); newStream.Position = 0; Copy(newStream, oldStream); }
// Process the SOAP message received and write to log file. public void ProcessMessage(SoapMessage message) throws Exception { switch(message.get_Stage()) { case SoapMessageStage.BeforeSerialize: break; case SoapMessageStage.AfterSerialize: WriteOutput((SoapServerMessage)message); break; case SoapMessageStage.BeforeDeserialize: WriteInput((SoapServerMessage)message); break; case SoapMessageStage.AfterDeserialize: break; default : throw new Exception("invalid stage"); } } //ProcessMessage // Write the contents of the incoming SOAP message to the log file. public void WriteInput(SoapServerMessage message) { // Utility method to copy the contents of one stream to another. Copy(oldStream, newStream); FileStream myFileStream = new FileStream(filename, FileMode.Append , FileAccess.Write); StreamWriter myStreamWriter = new StreamWriter(myFileStream); myStreamWriter.WriteLine("================================== " + "Request at " + DateTime.get_Now()); myStreamWriter.WriteLine("The method that has been invoked is : "); myStreamWriter.WriteLine("\t" + message.get_MethodInfo().get_Name()); myStreamWriter.WriteLine("The contents of the SOAP envelope are : "); myStreamWriter.Flush(); newStream.set_Position(0); Copy(newStream, myFileStream); myFileStream.Close(); newStream.set_Position(0); } //WriteInput // Write the contents of the outgoing SOAP message to the log file. public void WriteOutput(SoapServerMessage message) { newStream.set_Position(0); FileStream myFileStream = new FileStream(filename, FileMode.Append , FileAccess.Write); StreamWriter myStreamWriter = new StreamWriter(myFileStream); myStreamWriter.WriteLine("---------------------------------- " + "Response at " + DateTime.get_Now()); myStreamWriter.Flush(); // Utility method to copy the contents of one stream to another. Copy(newStream, myFileStream); myFileStream.Close(); newStream.set_Position(0); Copy(newStream, oldStream); } //WriteOutput

System.Web.Services.Protocols.LogicalMethodInfo


Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- LogicalMethodInfo クラスのページへのリンク