IiopGetReplyStatus Function

Action

Retrieves the reply status of the service previously requested, either IiopRequest or IiopLocateRequest.

Include file

IIOP.bdh

Syntax

IiopGetReplyStatus( in  hIiop   : number,
                    out nStatus : number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object
nStatus

Variable receiving the reply status. Possible return values for IiopRequest are:

  • IIOP_NO_EXCEPTION: Request completed successfully

  • IIOP_USER_EXCEPTION: User exception occurred

  • IIOP_SYSTEM_EXCEPTION: System exception occurred

  • IIOP_ABORTED: Request aborted, for example, when a timeout occurs

  • IIOP_LOCATION_FWD_PERM: Object is located elsewhere

  • IIOP_NEEDS_ADDR_MODE: Further addressing information needed to locate object

Possible return values for IiopLocateRequest are:

  • IIOP_UNKNOWN_OBJECT: The object is not recognized

  • IIOP_OBJECT_HERE: Object is present

  • IIOP_OBJECT_FORWARD: Object is located elsewhere

  • IIOP_OBJECT_FWD_PERM: Object is permanently located elsewhere

  • IIOP_LOC_SYS_EXCEPTION: System exception occurred

  • IIOP_LOC_NEEDS_ADDR_MODE: Further addressing information needed to locate object

Example

dcltrans
  transaction TGetReplyStatus
  const
    HOST   := "192.168.20.21"; // server
    PORT   := 1052; // port
    KEY    := "...\h00"; // key
    KEYLEN := 4; // key length
  var
    hIiop   : number; // handle to CORBA object
    nStatus : number;
  begin
    IiopSetMaxGiopVersion("1.0");
    IiopSetByteOrder(IIOP_BIG_ENDIAN);
    
    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2",
                     HOST, PORT, KEY, KEYLEN); 

    // call request "Init"
    IiopRequest(hIiop, "Init");

     // retrieve status
    IiopGetReplyStatus(hIiop, nStatus); 

    if nStatus = IIOP_NO_EXCEPTION then
      write("initialization completed successfully");
    else
      write("error during initialization");
    end;

    writeln;
    IiopObjectRelease(hIiop);
  end TGetReplyStatus;

Output

initialization completed successfully