3.1.5.1.2 Mapping Remote Method Invocation Reply
The Remote Method invocation reply consists of Return Value, OutputArguments, Exception, and Call Context.
The implementation MAY construct an Array of System.Object classes called Message Properties in order to transmit implementation-specific information to the client. The Array, if constructed, MUST contain items whose Remoting Types are instances of the DictionaryEntry Class as defined in DictionaryEntry (section 2.2.2.6). Each DictionaryEntry item MUST contain the name and the value of the implementation-specific information.<34>
The reply is serialized into the serialization stream by using the records defined in [MS-NRBF], as follows:
A SerializationHeader record as defined in [MS-NRBF] MUST be serialized. Following the SerializationHeader record, the Remote Method invocation reply MUST be serialized using a BinaryMethodReturn record and a MethodReturnCallArray record. The MethodReturnCallArray record is conditional and the rules for the presence of the MethodReturnCallArray record are given in the following table. The table specifies the rules for serializing reply and the values for the MessageEnum field of the BinaryMethodReturn record.
Item name |
Condition |
MessageEnum bit |
Item's serialized location |
---|---|---|---|
Return value |
None |
ReturnValueVoid |
-NA- |
Return value |
Null |
NoReturnValue |
-NA- |
Return value |
ReturnValueInline |
ReturnValue field of the BinaryMethodReturn record |
|
Return value |
non-Primitive Value |
ReturnValueInArray |
An item in the MethodReturnCallArray record |
Output Argument |
None |
NoArgs |
-NA- |
Output Argument |
All Primitive |
ArgsInLine |
Args field of the BinaryMethodReturn record |
Output Argument |
At least one non-primitive Argument and no Exception, Call Context, or Message Properties |
ArgsIsArray |
A separate ArraySingleObject record that follows the BinaryMethodReturn record |
Output Argumen t |
Otherwise |
ArgsInArray |
An item in the MethodReturnCallArray record |
Exception |
Absent |
0 |
-NA- |
Exception |
Present |
ExceptionInArray |
An item in the MethodReturnCallArray record |
Call Context |
LogicalCallID Only |
ContextInLine |
The Call Context field of the BinaryMethodReturn record |
Call Context |
Otherwise |
ContextInArray |
An item in the MethodReturnCallArray record |
Message Properties |
Absent |
0 |
-NA- |
Message Properties |
Present |
PropertiesInArray |
An item in the MethodReturnCallArray record |
If none of the items in the preceding table ended up in the MethodReturnCallArray record, then the record MUST be not present.
Following this, the Data Value contained in the Return Value, OutputArguments, Exception, Call Context, and Message Properties MUST be serialized. Each node in the Data Value graph MUST be iterated and each node MUST be serialized exactly once as specified in the following sections.