SoapMessage.GetReturnValue Method ()


Gets the return value of an XML Web service method.

Namespace:   System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)

public object GetReturnValue()

Return Value

Type: System.Object

An Object representing the return value of the XML Web service method.

Exception Condition

The XML Web service method does not have a return value.


The return value is not available. For details see the Remarks section

If a return value is not available, ASP.NET throws InvalidOperationException when accessing the GetReturnValue property.

In a SoapClientMessage the return value is available when the SoapMessageStage value is AfterDeserialize. In a SoapServerMessage the return value is available when SoapMessageStage value is BeforeSerialize.

myStreamWriter.WriteLine("The values of the return parameter are:");
myStreamWriter.WriteLine("The value of the return parameter is: {0}",

.NET Framework
Available since 1.1
Return to top