Siebel Object Interfaces Reference > Interfaces Reference > SiebelAppFactory Methods >

CreateSiebelAppObject


CreateSiebelAppObject returns a CORBA object reference for an Application object. An object reference for the SiebelAppFactory is available when the Object Request Broker is initialized. You can then use SiebelAppFactory.CreateSiebelAppObject to create Application object references.

Syntax

factoryRef->CreateSiebelAppObject()

Argument
Description
Not applicable
 

Returns

A CORBA object reference for a Siebel Application Object.

Usage

Obtain the SiebelAppFactory object reference as shown in the following example. Then invoke SiebelAppFactory.CreateSiebelAppObject to obtain an object reference for a Siebel Application object.

Used With

CORBA Object Manager

Example

This C++example illustrates how to get a reference for the SiebelAppFactory.

char* strServerName = new char[SERVER_NAME_LEN];
char* strHostName = "SCOMSERVER";
// append the host name to the server name
strcpy(strServerName,"SiebelObjectFactory:SiebelCorbaServer");
try {
      // bind to the Factory object in the server.
      appFact = SiebelAppFactory::_bind(strServerName, strHostName);
   } catch(const CORBA::SystemException& excep) {
      cout << "Error binding to SiebelObjectFactory" <<
      endl;
      return;
   }

CreateSiebelAppObject returns the reference to the Siebel Application Object.

SiebelApplication_var appObj;

try {
      appObj = appFact->CreateSiebelAppObject();
      cout << "Created Siebel object" << endl;
      }
   catch (const SiebelException& seblExcep) {
      cerr << "Error id : " << seblExcep.id << endl;
      cerr << "Error text : " << endl;
      cerr << seblExcep.desc << endl;
      return;
      }

try {
   // call the login method to access the Siebel application
   appObj->Login("CCONWAY", "CCONWAY");
   // Get the reference to the Accounts business object
   pBusObj = appObj->GetBusObject("Account");
} catch (SiebelException& excep) {

   cerr << "Error code : " << excep.id << endl;
   cerr << "Error text : " << excep.desc << endl;
   return;
}


 Siebel Object Interfaces Reference 
 Published: 18 June 2003