IiopSetValue Function

Action

Sets the header of a value type parameter that is associated with a CORBA object. This function can be used to set parameters of a request in advance of calling the IiopRequest function.

Include file

Iiop.bdh

Syntax

IiopSetValue( in hIiop     : number,
              in sRepId    : string optional,
              in sCodeBase : string optionl,
              in bChunked  : boolean optional,
              in nValueId  : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
sRepId Repository ID of the following value type (optional). This can also be a list of repository IDs. A list of repository IDs is encoded as a concatenation of a separator character (for example, a blank) followed by a repository ID.
sCodeBase Code base URL (optional).
bChunked Specifies whether the value should be chunked encoded (optional).
nValueId Used to reference this value with an indirection (IiopSetValueIndirect; optional).

Example

dcltrans
  transaction TSetValue
  const
    HOST        := "192.168.20.21"; // server
    PORT        := 1052;            // port
    KEY         := "...\h00";       // key
    KEYLEN      := 4;               // key length
    REP_ID      := "IDL:SetValueType:1.0";
    REP_ID_LIST := " IDL:DerivedValue:1.0 IDL:BaseValue:1.0 IDL:AbstractValue:1.0";
    CODE_BASE   := "www.codebase.com";
  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);

    // set value
    IiopSetValue(hIiop, REP_ID);
    IiopSetLong(hIiop, 5);
    IiopEndValue(hIiop ); 

    // set another value
    IiopSetValue(hIiop, REP_ID_LIST, CODE_BASE, TRUE);
    IiopSetBoolean(hIiop, TRUE);
    IiopSetLong(hIiop, 3);
    IiopSetValue(hIiop, REP_Id, "", TRUE);
    IiopSetLong(hIiop, 12);
    IiopEndValue(hIiop );
    IiopSetString(hIiop, "This is a string");
    IiopEndValue(hIiop );

    // call request "SetValue"
    IiopRequest(hIiop, "SetValue");
    IiopObjectRelease(hIiop);
  end TSetValue;