Previous Table of Contents Next


15.4.2 Request Message


   Request messages encode CORBA object invocations, including attribute accessor operations, and CORBA::Object operations get_interface and get_implementation. Requests flow from client to server.

   Request messages have three elements, encoded in this order:

   15.4.2.1 Request Header

   The request header is specified as follows:

   module GIOP { // IDL extended for version 1.1, 1.2, and 1.3.

   // GIOP 1.0

   struct RequestHeader_1_0 { // Renamed from RequestHeader IOP::ServiceContextList service_context; unsigned long request_id; boolean response_expected; sequence <octet> object_key; string operation; CORBA::OctetSeq requesting_principal;

   };

   // GIOP 1.1

   struct RequestHeader_1_1 { IOP::ServiceContextList service_context; unsigned long request_id; boolean response_expected; octet reserved[3]; // Added in GIOP 1.1 sequence <octet> object_key; string operation; CORBA::OctetSeq requesting_principal;

   };

   // GIOP 1.2, 1.3

   typedef short AddressingDisposition;const short KeyAddr = 0;const short ProfileAddr = 1;const short ReferenceAddr = 2;

   struct IORAddressingInfo {unsigned long selected_profile_index;IOP::IOR ior;

   };

   union TargetAddress switch (AddressingDisposition) {case KeyAddr: sequence <octet> object_key;case ProfileAddr: IOP::TaggedProfile profile;case ReferenceAddr: IORAddressingInfo ior;

   };

   struct RequestHeader_1_2 {unsigned long request_id;octet response_flags;octet reserved[3];TargetAddress target;string operation;IOP::ServiceContextList service_context;// requesting_principal not in GIOP 1.2 and 1.3

   }; typedef RequestHeader_1_2 RequestHeader_1_3; };

   The members have the following definitions:

   • operation is the IDL identifier naming, within the context of the interface (not a fully qualified scoped name), the operation being invoked. In the case of attribute accessors, the names are _get_<attribute> and _set_<attribute>. The case of the operation or attribute name must match the case of the operation name specified in the OMG IDL source for the interface being used.

   In the case of CORBA::Object operations that are defined in the CORBA Core (Section 4.3, “Object Reference Operations,? on page 4-12) and that correspond to GIOP request messages, the operation names are _interface, _is_a, _non_existent, _domain_managers, and _component.

   Note – The name _get_domain_managers is not used, to avoid conflict with a get operation invoked on a user defined attribute with name domain_managers.

   For GIOP 1.2 and later versions, only the operation name _non_existent shall be used.

   The correct operation name to use for GIOP 1.0 and 1.1 is _non_existent. Due to a typographical error in CORBA 2.0, 2.1, and 2.2, some legacy implementations of GIOP 1.0 and 1.1 respond to the operation name _not_existent. For maximum interoperability with such legacy implementations, new implementations of GIOP

   1.0 and 1.1 may wish to respond to both operation names, _non_existent and _not_existent.

   There is no padding after the request header when an unfragmented request message body is empty.

   15.4.2.2 Request Body

   In GIOP versions 1.0 and 1.1, request bodies are marshaled into the CDR encapsulation of the containing Message immediately following the Request Header. In GIOP version 1.2 and 1.3, the Request Body is always aligned on an 8-octet boundary. The fact that GIOP specifies the maximum alignment for any primitive type is 8 guarantees that the Request Body will not require remarshaling if the Message or Request header are modified. The data for the request body includes the following items encoded in this order:

   For example, the request body for the following OMG IDL operation

   double example (in short m, out string str, inout long p);

   would be equivalent to this structure:

   struct example_body { short m; // leftmost in or inout parameter long p; // ... to the rightmost

   };