Bookshelf Home | Contents | Index | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > Conversion or Casting Methods > CORBACreateObject() MethodCORBACreateObject binds a specified CORBA object and returns its object handle. SyntaxCORBACreateObject(instanceName[, objectName][, serverName]) ReturnsThe object handle of the CORBA object. UsageOnly the instanceName parameter is required. The serverName parameter may be specified either as an IP address in nnn.nnn.nnn.nnn form or as a fully qualified network name for the host computer. Valid types are strings, numbers, and object pointers. NOTE: Objects instantiated with CORBACreateObject do not support methods with out or in/out parameters. The optional parameters, which are valid only with the Visibroker ORB, provide greater specificity regarding the object to connect to. Thus, for example:
connects to the first account object found. Alternatively:
connects to the first object it finds named Bus_Server that contains an account object. If no object named Bus_Server is found, the method fails.
looks for an account object on the server with the IP address If you are using the Visibroker ORB, you must have IREP (an interface repository utility) running. IREP is part of the Visibroker ORB and must be running with the necessary IDL files loaded to allow access to a particular CORBA interface. If you are using the Orbix ORB, objects that are to be accessed must be registered with the Orbix Naming Service. This requires that the appropriate server changes be made such that the Server carries out the correct registration process. Objects may be registered in the Naming Service within certain contexts. For example, if you want to register one grid object in the grid.exe executable and this grid object has the human readable name gridObject1 in the server, then it is possible to register this object in the Naming Service under the context of
To resolve the object denoted by the name gridObject1, navigate through the appropriate context hierarchy to get the actual Object. Following this convention, use the following to call CORBACreateObject to obtain a reference to the preceding object:
Separate each of the Naming Context nodes with a colon (:). Note that Orbix ignores the second and third parameters to CORBACreateObject. NOTE: Siebel eScript has built-in exception support for CORBA objects. Use the try Statement and the throw Statement to build exception handlers. Orbix does not support built-in user exceptions for CORBA objects. CORBACreateObject and any call to CORBA objects can throw CORBAObjException in addition to exceptions declared in the IDL file. Exceptions can be caught in the eScript engine using try catch clauses. Exception objects always have a name and are accessible with name data member. In general, if the exception occurs while executing a CORBA function, the name of the exception object is CORBAObjException. If the error occurs in Siebel code, the exception name is SiebelException. User exceptions are not supported for Visibroker, where the exceptions declared in the IDL file are mapped to the corresponding eScript objects. The exception name is the one declared in the IDL. For example, the user can declare a completed exception object in the IDL as follows: exception DataException { Whenever this exception is thrown, the eScript catch clause can access this particular object data member using this syntax: if (obj.name == "DataException ") ExampleThis example instantiates a CORBA object and calls several methods on it. var cObj = myCorbaOb.balance () ; //call a method myCorbaOb.SetBalance (50000); //call another method myCorbaOb.accountNumber = accNum ; //set it. For more information on configuring the Siebel Client with the CORBACreateObject() Method, refer to the section on the JSECorbaConnector parameter in Siebel Web Client Administration Guide. |
Siebel eScript Language Reference |