LogicalMethodInfo Class
Represents the attributes and metadata for an XML Web service method. This class cannot be inherited.
Assembly: System.Web.Services (in System.Web.Services.dll)
LogicalMethodInfo is used primarily by a SOAP extension to interrogate the details of the XML Web service method with which the SOAP extension is configured to run. Depending on how the SOAP extension is configured, it can find out details about the XML Web service method in the GetInitializer method of SoapExtension that takes a LogicalMethodInfo. The LogicalMethodInfo provides details such as the XML Web service method's parameters by accessing the Parameters property and any custom attributes applied to the XML Web service method using the GetCustomAttributes property.
For more details on SOAP extensions see the SoapExtension class or [<topic://cpconAlteringSOAPMessageUsingSOAPExtensions>].
' 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
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98, Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.