SoapMessage.GetOutParameterValue Method (Int32)

 

Gets the out parameter passed into the XML Web service method at the specified index.

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

public object GetOutParameterValue(
	int index
)

Parameters

index
Type: System.Int32

The zero-based index of the parameter in the array of parameters.

Return Value

Type: System.Object

An Object representing the parameter at the specified index.

Exception Condition
IndexOutOfRangeException

The index parameter is greater than the length of the parameters array.

InvalidOperationException

Accessing this property when out parameters are not available. For details see the Remarks section.

If out parameters are not available, ASP.NET throws an InvalidOperationException when accessing the GetOutParameterValue property.

In a SoapClientMessage the out parameters are available in the AfterDeserializeSoapMessageStage. In a SoapServerMessage the out parameters are available in the BeforeSerialize of the SoapMessageStage.

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

.NET Framework
Available since 1.1
Return to top
Show: