CORBARequest ノードを構成して、応答の送信先とするロケーションを定義します。
呼び出しが成功すると、結果として出されるメッセージは Out ターミナルに伝搬されます。 ツリーの中には、InterfaceName.OperationNameResponse という名前の最上位エレメントがあります。 このタイプの下には、操作の戻りの型 (named _return)、およびすべての inout または out パラメーターがあります。 in パラメーターは変更されないので、伝搬されません。
in、inout、および out パラメーターの混合
interface
ExampleOne {
string exampleOneOperation(in string inparam, out string outparam, inout string inoutparam);
}
パラメーターの outparam および inoutparam を、最上位エレメント ExampleOne.exampleOneOperationResponse の下で受け取ります。 <ExampleOne.exampleOneOperationResponse>
<_return>The operation return value</_return>
<outparam>value from corba app</outparam>
</inoutparam>your value changed by the corba app<inoutparam>
</ExampleOne.exampleOneOperationResponse>
out および inout パラメーター
interface
ExampleTwo {
string exampleTwoOperation(out string outparam, inout string inoutparam);
}
in パラメーターは伝搬されないので、in パラメーターを除去しても、CORBARequest ノードから伝搬されるメッセージに変更はありません。 <ExampleTwo.exampleTwoOperationResponse>
<_return>The operation return value</_return>
<outparam>value from corba app</outparam>
</inoutparam>your value changed by the corba app<inoutparam>
</ExampleTwo.exampleTwoOperationResponse>
in パラメーターのみ、またはパラメーターなし
操作にパラメーターが含まれないか、または in パラメーターのみの場合は、最上位エレメントの下で _return 値を受け取ります。
interface
ExampleThree {
string exampleThreeOperation(in string inparam);
}
以下に示すのは、XML の例です。<ExampleThree.exampleThreeOperationResponse>
<_return>The operation return value</_return>
</ExampleThree.exampleThreeOperationResponse>
戻りの型がなく (void)、inout または out パラメーターがない
呼び出す操作で戻りの型がなく (void)、inout または out パラメーターもない場合は、CORBA アプリケーションからツリーに入れる値が戻されません。 この場合、最上位エレメントだけが作成されます。
interface
ExampleFour {
void exampleFourOperation(in string inparam);
}
以下に示すのは、XML の例です。<ExampleFour.exampleFourOperationResponse>
</ExampleFour.exampleFourOperationResponse>
CORBA ユーザー定義の例外または CORBA システムの例外が発生すると、メッセージは Error ターミナルに伝搬されます。 CORBA システムの例外には、次のような標準の形式があります。
exception SystemException { // descriptive of error
unsigned long; // more detail about error
CompletionStatus; // yes, no, maybe
}
<SystemException>
<minor>10</minor>
<completed>maybe</completed>
</SystemException>
最上位エレメントは、発行される CORBA システムの例外の名前です。 ユーザー定義の例外の構造は、その例外の IDL に基づいています。 以下に例を示します。 exception BadRecord {
string why;
};
メッセージでは:<BadRecord>
<why>reason text</why>
</BadRecord>
この例から分かるように、メッセージの構造は例外に基づいていて、呼び出される操作によって修飾されることはありません。