Operation.ParameterOrderString Property
Gets or sets an optional Remote Procedure Call signature ordering specification for request-response or solicit-response operations.
[Visual Basic] Public Property ParameterOrderString As String [C#] public string ParameterOrderString {get; set;} [C++] public: __property String* get_ParameterOrderString(); public: __property void set_ParameterOrderString(String*); [JScript] public function get ParameterOrderString() : String; public function set ParameterOrderString(String);
Property Value
A list of names of MessagePart instances separated by a single space.
Remarks
The named MessagePart instances must adhere to the following rules:
- The order of the named MessagePart instances reflects the order of the parameters in the RPC (remote procedure call) signature, which is the name of the operation, its input and output parameters, the results it returns and the exceptions it might be asked to handle.
- The return value is not present in the list.
- If the MessagePart name appears in both the input and output messages, it is an in/out parameter.
- If the MessagePart name appears only in the input message, it is an in parameter.
- If the MessagePart name appears only in the output message, it is an out parameter.
Note that this parameter list is not required, even if the Operation is to be used with an RPC-style Binding. You should not call ParameterOrderString directly. This method is only used internally for xml serialization. To return the parameter list use ParameterOrder.
Example
[Visual Basic] Dim myString As String = Nothing Dim myOperation As New Operation() myDescription = ServiceDescription.Read("Operation_2_Input_VB.wsdl") Dim myMessage(myDescription.Messages.Count) As Message ' Copy the messages from the service description. myDescription.Messages.CopyTo(myMessage, 0) Dim i As Integer For i = 0 To myDescription.Messages.Count - 1 Dim myMessagePart(myMessage(i).Parts.Count) As MessagePart ' Copy the message parts into a MessagePart. myMessage(i).Parts.CopyTo(myMessagePart, 0) Dim j As Integer For j = 0 To (myMessage(i).Parts.Count) - 1 myString += myMessagePart(j).Name myString += " " Next j Next i ' Set the ParameterOrderString equal to the list of ' message part names. myOperation.ParameterOrderString = myString Dim myString1 As String() = myOperation.ParameterOrder Dim k As Integer = 0 Console.WriteLine("The list of message part names is as follows:") While k < 5 Console.WriteLine(myString1(k)) k += 1 End While [C#] string myString = null ; Operation myOperation = new Operation(); myDescription = ServiceDescription.Read("Operation_2_Input_CS.wsdl"); Message[] myMessage = new Message[ myDescription.Messages.Count ] ; // Copy the messages from the service description. myDescription.Messages.CopyTo( myMessage, 0 ); for( int i = 0 ; i < myDescription.Messages.Count; i++ ) { MessagePart[] myMessagePart = new MessagePart[ myMessage[i].Parts.Count ]; // Copy the message parts into a MessagePart. myMessage[i].Parts.CopyTo( myMessagePart, 0 ); for( int j = 0 ; j < myMessage[i].Parts.Count; j++ ) { myString += myMessagePart[j].Name; myString += " " ; } } // Set the ParameterOrderString equal to the list of // message part names. myOperation.ParameterOrderString = myString; string[] myString1 = myOperation.ParameterOrder; int k = 0 ; Console.WriteLine("The list of message part names is as follows:"); while( k<5 ) { Console.WriteLine( myString1[k] ); k++; } [C++] String* myString = 0 ; Operation* myOperation = new Operation(); myDescription = ServiceDescription::Read(S"Operation_2_Input_CS.wsdl"); Message* myMessage[] = new Message*[ myDescription->Messages->Count ] ; // Copy the messages from the service description. myDescription->Messages->CopyTo( myMessage, 0 ); for( int i = 0 ; i < myDescription->Messages->Count; i++ ) { MessagePart* myMessagePart[] = new MessagePart*[ myMessage[i]->Parts->Count ]; // Copy the message parts into a MessagePart. myMessage[i]->Parts->CopyTo( myMessagePart, 0 ); for( int j = 0 ; j < myMessage[i]->Parts->Count; j++ ) { myString = String::Concat( myString, myMessagePart[j]->Name, S" " ); } } // Set the ParameterOrderString equal to the list of // message part names. myOperation->ParameterOrderString = myString; String* myString1[] = myOperation->ParameterOrder; int k = 0 ; Console::WriteLine(S"The list of message part names is as follows:"); while( k<5 ) { Console::WriteLine( myString1[k] ); k++; }
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
Operation Class | Operation Members | System.Web.Services.Description Namespace