Click here to Skip to main content
15,867,835 members
Articles / Programming Languages / C++
Article

CORBA Application Wizard - A Tutorial on usage. Part I

Rate me:
Please Sign up or sign in to vote.
4.89/5 (5 votes)
3 Nov 20033 min read 47.9K   17   5
A tutorial on how to use the CORBA Application Wizard

Introduction

This tutorial shows one how to use the CORBA Application Wizard by creating a simple application that will simulate a Stock Quoter. I will assume that you know how to create a new project using Application Wizards and have already provided an appropriate name for your project. I will also assume that you have some knowledge about CORBA.

This tutorial is based on the online tutorial that is included with the TAO source code. A big THANK YOU has to go to Doug Schmidt for giving me permission to use the code found in this tutorial.

Initially this tutorial was to consist of just one part but with the increasing length of the tutorial it was decided to divide the tutorial into two parts. This is part one and takes one through all the steps of the application wizard. Part two is found here and deals with completing the Stock Quoter application.

Step 1

Image 1

For this tutorial we will create a simple console application. So we will select the Console Application option and then press the Next button to move onto Step 2. The other two options MFC Application and Win32 Application aren't yet fully functional.

Step 2

Image 2

Actually we need to create two applications. One application will act as the server while the other application will act as the client. We will first create the server by selecting the Server option. Selecting the Client option will create a client application, while selecting the Server and Client will result in your application acting as both a server and a client. After we have created the server application we will then need to run the CORBA Application Wizard again and create a client application.

Selecting the debug version will cause the application to be linked with the debug versions of the TAO-associated libraries.

(Coming to think of it, I am wondering if I should give the user the option of having the individual server and client applications being created at the same time to save the user of having to run the AppWizard again.)

Step 3

Image 3

I have entered a module name Quoter that will result in all the interfaces being included in a single idl file, namely Quoter.idl. Leaving out a module name will result in each interface being placed in its own .idl file. I have also named the interfaces to be created: Stock and StockFactory. The Quoter.idl file will contain the following code immediately after creation:

#ifndef Quoter_module
#define Quoter_module

module Quoter
{
    interface Stock
    {
        
    };

    interface StockFactory
    {
        
    };

};

#endif    //Quoter_module

The Stock interface will be used to query the prices of stock whereas the StockFactory interface will be used to "gain access to the Stock object references from their symbols". For a more detailed description about the Quoter Application see the "Building a Stock Quoter with TAO" tutorial by Carlos O'Ryan.

Step 4

Image 4

We don't have to worry about anything here, so just click on the Next button.

Step 5

Image 5

To keep this tutorial simple, use will be made of an Interoperable Object Reference (IOR) string. The transfer of the IOR string between the server and the client will be done using a file. I'll show you how this can be done at the end of the second part of this tutorial.

Step 6

Image 6

Here we will make use of the Static Invocation Interface. For this tutorial, this is the easiest. Now we have reached the end of the steps and are ready to create the application. So click on the Finish button. The application framework will now be generated and displayed on the Visual Studio IDE. Now repeat the above steps but in step 2 select the client option instead of the server option. To complete the application go to the second part of this tutorial.

History

  • 3 November 2003 - First public release.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United Kingdom United Kingdom
I am a qualified Veterinary Surgeon who prefers treating computers with viruses than animals with viruses. I have recently completed a MEng German Informatics degree at the University of Reading with a 2:1. I also have the ISEB Foundation Certificate in Software Testing.

Currently I am umemployed and desparately looking for a job in the IT industry.

Comments and Discussions

 
Generalcustom wizard question Pin
wangxuan20056-Jun-05 23:08
wangxuan20056-Jun-05 23:08 
GeneralCustom Appwizard question Pin
wangxuan20056-Jun-05 23:06
wangxuan20056-Jun-05 23:06 
Generalcreate distributed applications via corba Pin
neeraj sharma28-Jun-04 2:29
neeraj sharma28-Jun-04 2:29 
GeneralRe: create distributed applications via corba Pin
Franz Klein28-Jun-04 5:59
Franz Klein28-Jun-04 5:59 
GeneralRe: create distributed applications via corba Pin
Franz Klein2-Mar-05 23:51
Franz Klein2-Mar-05 23:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.