Operation.ParameterOrderString プロパティ
要求応答操作または請求応答操作に関するオプションのリモート プロシージャ コール署名の順序付け仕様を取得または設定します。
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);
プロパティ値
単一の空白で区切られた、 MessagePart インスタンスの名前のリスト。
解説
名前付き MessagePart インスタンスには、次の規則があります。
- 名前付き MessagePart インスタンスの順序は、RPC (リモート プロシージャ コール) 署名のパラメータの順序を反映します。つまり、操作の名前、操作時の入力パラメータと出力パラメータ、返された結果、および処理を要求される例外という順序になります。
- 戻り値はリスト内に表示されません。
- MessagePart の名前が入力メッセージと出力メッセージの両方に表示される場合は in/out パラメータです。
- MessagePart の名前が入力メッセージだけに表示される場合は in パラメータです。
- MessagePart の名前が出力メッセージだけに表示される場合は、 out パラメータです。
Operation を RPC スタイルの Binding で使用する場合でも、このパラメータ リストは必須ではありません。ParameterOrderString を直接呼び出すことは避けてください。このメソッドは、XML のシリアル化の目的で内部的にだけ使用されます。パラメータ リストを返すには、 ParameterOrder を使用します。
使用例
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] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
Operation クラス | Operation メンバ | System.Web.Services.Description 名前空間