[prev in list] [next in list] [prev in thread] [next in thread]
List: mico-devel
Subject: Creating a CORBA server which is also a client.
From: Suven Pillay <pillay.suven () columbus ! co ! za>
Date: 2000-09-20 12:18:39
[Download RAW message or body]
Hello all.
I am having some difficulty with developing a CORBA server which is
actually a CORBA client
In the implementation file of the object I have #included the .h file
created by the idl command and also the class_impl.h of the class I am
implementing.
The idl file looks as below :
/*THIS IDL FILE IS USED FOR TESTING THE MIDDLEWARE ACCESS MODULE*/
/*SERVER AND CLIENT*/
interface stocklist
{
//This function needs to call the authen function listed as part of the
interface authenobj
long updatesometable();
};
/*SERVER ONLY*/
interface authentobj
{
long getaccess(in string
si_username,out string so_dbname, out string so_dbpwd);
void authen();
};
The "long updatesometable()" of the first interface needs to call the "void
authen()" of the second interface.
I have successfuly implemented both servers independantly and with out the
interaction and have tested it with a dedicated client and a combined
client to each server.
In order to get the interactin between the two interfaces I have changed
the implementation of the stocklist interface to look as below :
#include "stocklist_impl.h"
#include "uamtest.h"
#include
"iostream.h"
CORBA::Long stocklist_impl :: updatesometable()
{
int argc =
0;
char **argv={0};
cout<<"In the updatesometable function of the
stocklist object!"<<endl;
cout<<"Gonna try and call authen function of
authentication objcet!"<<endl;
//Init the orb abd boa for the call the the authentication object
CORBA::ORB_var orb = CORBA::ORB_init(argc,argv,"mico-local-orb");
cout<<"Have init. the orb"<<endl;
CORBA::BOA_var boa =
CORBA::BOA_init(argc,argv,"mico-local-boa");
cout<<"Have init. the boa
orb"<<endl;
CORBA::Object_var obj =
orb->bind("IDL:authentobj:1.0","inet:CSSD3:9004");
cout<<"Trying to bind
to the authent object"<<endl;
if (CORBA::is_nil(obj))
{
cout<<"The
authentication obj is currently nil"<<endl;
}
else
{
authentobj_var
clientauth = authentobj::_narrow(clientauth);
cout<<"Gonna try to call the
authen member function of the authentication object"<<endl;
clientauth->authen();
}
cout<<"Attempting to update some
table!"<<endl;
return 1;
};
The ERROR I get when I try to compile this
implementation call is the following :
"stocklist_impl.cc", line 14: Warning: orb hides CORBA::Object::orb.
"stocklist_impl.cc", line 16: Error: BOA_init is not a member of CORBA.
1 Error(s) and 1 Warning(s) detected.
By the way I am compiling on Sun Sparc running Solaris 4.2
Please help!
Thanks in advance.
Suven Pillay
Information Systems
Columbus Stainless
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic