IiopLocateRequest Function

Action

Sends an IIOP LocateRequest message, waits until the server sends a LocateReply message, and binds the BDL object handle to the new object key and host address of the received IOR.

Sends an IIOP LocateRequest message, waits until the server sends a LocateReply message, and binds the BDL object handle to the new object key and host address of the received IOR.

Include file

IIOP.bdh

Syntax

IiopLocateRequest( in hIiop  : number,
                   in nFlags : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object
nFlags

Specifies the location request message variant sent to the server (optional). Possible values are:

  • IIOP_IGNORE_EXCEPTION. Prevents the generation of error messages. This parameter may be combined with the following flag:

  • IIOP_IGNORE_FORWARDS. The request is not re-sent if a "location forward" or "needs addressing mode" response is received.

This parameter may be combined with one of the following flags:

  • IIOP_ADDR_KEY. The target address is specified by the key. This is the default addressing mode.

  • IIOP_ADDR_PROFILE. The target address is specified by a profile (part of an IOR). This addressing mode is needed, for example, for traversing firewalls.

  • IIOP_ADDR_REFERENCE. The target address is specified by an IOR.

This parameter may be combined with one of the following flags:

  • IIOP_USE_V10. The request is sent using IIOP 1.0 encoding (if possible).

  • IIOP_USE_V11. The request is sent using IIOP 1.1 encoding (if possible).

  • IIOP_USE_V12. The request is sent using IIOP 1.2 encoding (if possible).

Example

dcltrans
  transaction TLocateRequest
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052; // port
    KEY    := "...\h00"; // key
    KEYLEN := 4; // key length
  var
    hIiop : number;
    // handle to CORBA object
    nSum : number;
  begin
    IiopSetMaxGiopVersion("1.2");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);
    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2", HOST, PORT, KEY, KEYLEN);
    IiopLocateRequest(hIiop);
    // call request "Print"
    IiopRequest(hIiop, "Print", IIOP_ADDR_REFERENCE | IIOP_USE_V12);
    IiopObjectRelease(hIiop);
  end TLocateRequest;