SoapServerMessage::Server Property
.NET Framework (current version)
Gets the instance of the class handling the method invocation on the Web server.
Assembly: System.Web.Services (in System.Web.Services.dll)
| Exception | Condition |
|---|---|
| InvalidOperationException | SoapMessageStage is not AfterDeserialize or BeforeSerialize. |
The Server property is an instance of the class implementing the XML Web service. If a SOAP extension knew ahead of time the type of the class, it could cast Server to that type and access properties and methods of the class implementing the XML Web service. The Server property can be accessed during AfterDeserialize or BeforeSerialize.
The following code fragment is part of a SOAP extension that logs the SOAP messages sent and received by an XML Web service. This particular fragment outputs to the log file the type of the XML Web service, if it is MathSvc.
.NET Framework
Available since 1.1
Available since 1.1
Show: