SoapMessage.GetInParameterValue Method

Gets the 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^ GetInParameterValue (
	int index
)
public Object GetInParameterValue (
	int index
)
public function GetInParameterValue (
	index : int
) : Object
Not applicable.

Parameters

index

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

Return Value

An Object representing the parameter at the specified index.

Exception typeCondition

IndexOutOfRangeException

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

InvalidOperationException

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

The GetInParameterValue property is only accessible when in parameters are available. ASP.NET throws InvalidOperationException when accessing the GetInParameterValue property if in parameters are not available.

In a SoapClientMessage the in parameters are available in the BeforeSerializeSoapMessageStage. In a SoapServerMessage the in parameters are available in the AfterDeserializeSoapMessageStage.

myStreamWriter->WriteLine( "The values of the in parameters are:" );
myStreamWriter->WriteLine(
   "Value of first in parameter: {0}", message->GetInParameterValue( 0 ) );
myStreamWriter->WriteLine(
   "Value of second in parameter: {0}", message->GetInParameterValue( 1 ) );

myStreamWriter.WriteLine("The values of the in parameters are:");
myStreamWriter.WriteLine("Value of first in parameter: {0}", message.                          GetInParameterValue(0));
myStreamWriter.WriteLine("Value of second in parameter: {0}", message.                     GetInParameterValue(1));

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: