Quick Start of CORBA Application

This is very generic & just the approach to write a corba application has been defined. This is not a tutorial in anyway. I'll try to build a tutorial & put it here soon.

1)Write the IDL with interfaces(for each object implementation) and operation for the methods you support in that object.
2) compile with the given idl compiler.
3)Include generated stub code (.hh for Orbix, Types.hh for Orbplus) file in your client code.
4)Include generated skeleton code (.hh for Orbix, Server.hh)  file in your server code.
5)Declare an implementation class for the interfaces you defined in IDL. This impl class must be derived from the Object Adapter class generated for that interface. (HPSOA_ class in Orbplus, BOAImpl class in Orbix)  Provide implementation for all the functions in that interface.
6) Declare an instance of implementation class. Then make your server to go in listen mode (refer to the specific orb programming guide how to do it). Now your server is running with the specified implementation in it.
7)In the client get the object reference of the implementation object in server. (For this in server write the stringified object reference to a file, which the client reads and narrows it to the specific object reference. OR bind your object to some name to Naming Service in server and resolve that in your client side. For more details look into the specific orb progamming guide).
9) Then invoke the operation on that particular server.

Back to

This page hosted by 
Get your own Free Home Page

1