3.1.5.1.1 Mapping Remote Method Request

Information required to perform a Remote Method invocation consists of a Server Type or Server Interface name, a Remote Method name, Input Arguments, Generic Arguments values, Method Signature, and a Call Context.

The implementation MAY construct an Array of System.Object classes called Message Properties in order to transmit implementation-specific information to the server. The Array, if constructed, MUST contain items whose Remoting Types are instances of the DictionaryEntry Class as specified in DictionaryEntry (section 2.2.2.6). Each DictionaryEntry item MUST contain the name and the value of the implementation-specific information.<33>

The request is serialized into the serialization stream by using the records specified in [MS-NRBF], as follows:

A SerializationHeaderRecord record as specified in [MS-NRBF] MUST be serialized. The Remote Method invocation request is serialized using a BinaryMethodCall record and a MethodCallArray record. The Server Type or the Server Interface name MUST be serialized in the TypeName field of the BinaryMethodCall record. The Remote Method name is serialized in the MethodName field of the BinaryMethodCall record. The MethodCallArray record is conditional and the rules for the presence of the MethodCallArray record are given in the following table. The table specifies the rules for serializing the request and the values for the MessageEnum field of the BinaryMethodCall record.

 Item name

 Condition

 MessageEnum field bits

 Item's serialized location

Input Arguments

No Arguments

NoArgs

-NA-

Input Arguments

All Arguments are primitive

ArgsInLine

Args field of the BinaryMethodCall record

Input Arguments

At least one nonprimitive Argument and no GenericArgumentsValues, MethodSignature, CallContext, or Message Properties

ArgsIsArray

A separate ArraySingleObject record that follows the BinaryMethodCall record

Input Arguments

Otherwise

ArgsInArray

An item in the MethodCallArray record

GenericArgumentsValues

Absent

0

-NA-

GenericArgumentsValues

Present

Generic Method

An item in the MethodCallArray record

Method Signature

Absent

0

-NA-

Method Signature

Present

MethodSignatureInArray

An item in the MethodCallArray record

Call Context

LogicalCallID Only

ContextInLine

CallContext field of the BinaryMethodCall record

Call Context

Otherwise

ContextInArray

An item in the MethodCallArray record

Message Properties

Absent

0

-NA-

Message Properties

Present

PropertiesInArray

An item in the MethodCallArray record

If none of the items in the preceding table ended up in a MethodCallArray record then the record MUST be not present.

Following this, the Data Values contained in the Input Arguments, Generic Arguments values, Method Signature, 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.