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 ()
public Object GetReturnValue ()
public function GetReturnValue () : Object
Not applicable.

Return Value

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

Exception typeCondition

InvalidOperationException

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

OR

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}", message->GetReturnValue() );

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

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

.NET Compact Framework

Supported in: 2.0, 1.0

Community Additions

ADD
Show: