IiopEndServiceContext Function

Action

Finalizes the construction of a service context. This process is started by calling the IiopBeginServiceContext; the content of a service context is supplied with the help of the IIOP SetFunctions.

A service context list is held globally for a CORBA object. This means that the service context list is sent unchanged with every IiopRequest function call, unless a new service context list is created, using the functions IiopBeginServiceContext, IiopEndServiceContext, IiopSetServiceContext or IiopDeleteServiceContextList.

However, if a service context list is defined for a callback object using the same functions, it is bound to a special operation defined by IiopObjectListen. Any time this operation is invoked by the server, Silk Performer returns the service context list along with the IIOP reply message.

Include file

IIOP.bdh

Syntax

IiopEndServiceContext( in hIiop: number ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.

Example

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

    // retrieve handle to server
    IiopObjectCreate(hIiop, "IDL:DemoObject:1.0", "1.2",
                     HOST, PORT, KEY, KEYLEN);

    // create service context
    IiopBeginServiceContext(hIiop, 1, IIOP_LITTLE_ENDIAN);
    IiopSetUlong(hIiop, 0x1010);
    IiopSetUlong(hIiop, 0x0110);
    IiopEndServiceContext(hIiop);

    // pass long value parameter to request
    IiopSetLong(hIiop, 593814064);

    // call request "DecToHex" with long parameter
    IiopRequest(hIiop, "DecToHex");
    ...
    IiopObjectRelease(hIiop);
  end TServiceContext;