HI,
I am new to corab. I have c++ corba client. I cant change that clinet. I want to write corba server in
java which will be response to client.
Client class is containng following code block :
string corbaloc = "corbaloc::";
corbaloc += serverNamePort;
corbaloc += "/IncSecurityObjKey";
//cout << std::endl << " Created Security corbaloc " <<std::endl ;
LOG (1, " Created Security corbaloc");
//Get the security interface
CORBA::String_var theSecurityIOR;
//destringify the IOR
CORBA::Object_var securityObj;
try
{
securityObj = (*orb)->string_to_object( corbaloc.c_str() );
}
catch(...)
{
//cout << std::endl << "FAILURE: string_to_object( " << corbaloc << " ) threw an unknown exception" << std::endl;
LOG (1, "FAILURE: string_to_object( " << corbaloc.c_str() << " ) threw an unknown exception");
return CE_CONNECTFAILED;
}
try
{
if(CORBA::is_nil(securityObj.in()))
{
//cout << std::endl << "FAILURE: the resolved security interface was a NULL reference" << std::endl;
LOG (1, "FAILURE: the resolved security interface was a NULL reference");
return CE_CONNECTFAILED;
}
}
catch(...)
{
//cout << std::endl << "FAILURE: CORBA::is_nil(securityObj.in()) threw an unknown exception" << std::endl;
LOG (1, "FAILURE: CORBA::is_nil(securityObj.in()) threw an unknown exception");
return CE_CONNECTFAILED;
}
try
{
//narrow the object to a security reference
security = new Incognito::Security_var;
//cout << std::endl << "security object created " << std::endl ;
LOG (1, "security object created");
(*security) = Incognito::Security::_narrow(securityObj.in());
What should I write in server program it wil support this naming style and creates naming service.
Please help
Thanks in advance