background image
Bionic Buffalo Tech Note #20: Quick Start Guide to Writing CORBA Client Applications 
The key information a client application developer needs regarding server objects include the interface
and data definitions as defined by the objects' IDL (interface definition language) description, and how
the object is made available, advertised, or to be discovered. 
The IDL description is well specified by the CORBA specifications themselves. It embodies a
complete description of how the operations are invoked, along with the necessary data definitions
(structures, enumerations, and so on), and also describes the exceptions that might occur upon
invocation. IDL is beyond the scope of this Tech Note. The reader is referred to the CORBA
specification for more information. However, in short, IDL is the language that serves as input to an
IDL compiler, on which more, below. 
In order to invoke an operation on an object, an application needs a reference to that object. The IDL
does not define how the client can find the server object and obtain an object reference. The common
ways are: 
 
 Name service. An object reference is made available on a name service. A name service provides a
tree structured directory of objects, similar to that a typical file system directory. To use the object,
the client application must have (a) an object reference for the name service, and (b) the name of the
object. 
 
 Trading service. An object is advertised on a trading service. A trading service is a kind of database
of objects, which are indexed by attributes. To use the object, the client must have (a) an object
reference for the trading service, and (b) attributes of the object so it can be found using the trading
service. Using a trading service may be used when any of several equivalent objects may be
acceptable. For example, if there are several servers giving weather information, a trading service
may allow an application to find some object that provides the necessary information, but maybe
not any specific object. 
 
 Object identifier. Certain objects are given character string identifiers, known as object ids. The
string can be used to obtain an object reference. This method is used for fundamental objects such
as the interface repository. This method is not generally applicable to application objects. To use the
object, the client must know the string identifier. 
(Note: CORBA uses the term “object identifier” in two distinct ways. As used above, “object
identifier” refers to strings of the type 
CORBA::ORB::ObjectId. The other kind of object
identifier refers to opaque sequences of octets, and is defined as
PortableServer::ObjectId. These two kinds of object identifier are not interchangeable,
although in some implementations there may be a relationship between them.) 
 
 Object URL. This method is analogous to the use of URLs on web browsers. The 
ORB provides an
operation, 
string_to_object, which will return an object reference when given the object
URL string. There are various kinds of object URLs. To be resolved, some depend on the existence
of other services, such as the name service or trading service. (The 
string_to_object
operation takes care of the resolution process, but the service may still be required.) Not all 
ORBs or
environments support the resolution of all types of object URL. Sometimes, an object URL string
can be constructed on-the-fly by an application according to some rule set. To use the object, the
Page 3 of 11