Developing Component Software with CORBA > 2 Quick Start Tutorial > 2.1 A CORBA-based Hello World


2.1.1 Defining the interface

We first need to define the interface of the Hello World server object. The client and server will communicate across this interface. The interface is defined using IDL in a single file that must have the extension .idl .

  1. Create a file called hello-world.idl .
  2. Enter the IDL declaration below into the hello-world.idl file.
module HelloWorld {
  interface world {
    string hello();

This IDL declaration says that there are CORBA objects of a kind called world , and that there is an operation called hello on world objects that takes no arguments and returns a string. Servers implement world , and clients call hello on instances of world .

Now that we have written the IDL, we can run the IDL parser over it to produce stub and skeleton code for the client and server parts of the application.

Developing Component Software with CORBA - 22 Dec 2009