IiopDeleteServiceContextList Function

Action

Deletes the entire service context list for an object.

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

IiopDeleteServiceContextList( 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);
    
    // create another service context
    IiopBeginServiceContext(hIiop, 17, IIOP_BIG_ENDIAN);
    IiopSetShort(hIiop, 2);
    ...
    IiopEndServiceContext(hIiop);

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

    // call request "DecToHex" with long parameter
    IiopRequest(hIiop, "DecToHex");
    // do not send a service context list along with the next request
    IiopDeleteServiceContextList(hIiop);
    IiopSetLong(hIiop, 593814065);
    IiopRequest(hIiop, "DecToHex");
    ...
    IiopObjectRelease(hIiop);
  end TServiceContext;