aspose file tools*
The moose likes Distributed Java and the fly likes I am unable to connect corba client to corba server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "I am unable to connect corba client to corba server" Watch "I am unable to connect corba client to corba server" New topic
Author

I am unable to connect corba client to corba server

varsha shah
Greenhorn

Joined: Aug 10, 2011
Posts: 3
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I am unable to connect corba client to corba server