IiopObjectSetIiopProfile Function

Action

Appends or replaces an Internet profile in an IOR. If the specified profile exists, the component is replaced. This can be suppressed by using the flag IIOP_NO_REPLACE. If a replacement is impossible because of an invalid profile index or because the selected profile is no Internet profile, the function appends the component to the list. This again can be suppressed by the flag IIOP_NO_APPEND.

Include file

IIOP.bdh

Syntax

IiopObjectSetIiopProfile( in hIiop    : number,
                          in nProfile : number,
                          in sVersion : string,
                          in sHost    : string,
                          in nPort    : number,
                          in sKey     : string,
                          in nKeyLen  : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hIiop Handle to a CORBA object.
nProfile

Index of the profile. Set this parameter to IIOP_FIRST or IIOP_LAST for the first or the last profile, respectively. In addition, you can supply either the IIOP_NO_REPLACE or the IIOP_NO_APPEND flag.

The index of the first profile is zero (0).

sVersion IIOP version used to communicate with the CORBA object. Currently this parameter can be set to “1.0”, “1.1” or “1.2”.
sHost Host name or IP address of the machine where the CORBA object is located.
nPort Port on that the CORBA object is listening for incoming connections.
sKey Unique key that identifies the CORBA object.
nKeyLen Length of the key identifying the object in bytes (optional).

Example

var
  hSSLBank, hCombined: number;
 dcltrans
  transaction TMain
  var
    sData, sKey : string;
    nType       : number;
  begin
    // create an empty object
    IiopObjectCreate(hCombined, "", "", "", 0, "", 0);
    
    // copy profile of bank using SSL
    IiopObjectGetProfile(hSSLBank, IIOP_FIRST, nType, sData);
    IiopObjectSetProfile(hCombined, IIOP_NO_REPLACE, nType, sData);

    // append an internet profile for a bank object
    IiopObjectSetIiopProfile(hCombined, IIOP_NO_REPLACE, "1.2",
                               sHost, nPort, sKey);
    IiopSetString(hCombined, "James Smith");
    IiopRequest(hCombined, "open");
  end TMain;