Sebastian Bickel
2006-08-03 01:59:41 UTC
Client:
NamingContext nc =
NamingContextHelper.narrow(orb.resolve_initial_references(
"NameService"));
if(nc == null)
System.out.println("nc is NULL");
else
System.out.println("nc is not NULL");
NameComponent[] name = new NameComponent[1];
name[0] = new NameComponent("Login","Object");
org.omg.CORBA.Object o = nc.resolve(name);
CommunicationServer.Login l = LoginHelper.narrow(o);
if (l != null)
{
System.out.println("It's working.");
short ret = l.log_in(username, password);
System.out.println("Retruncode: " + ret);
} else
System.out.println("Not in the naming context");
Server:
CORBA::Short Login_impl::log_in (const char * user, const char * password)
{
std::cout << "Login_impl::log_in" << std::endl;
system("touch /tmp/login_impl");
CORBA::Short ret;
ret = 1;
return m_return;
}
I used omniORB in the actual release version; the java client has been done with jdk 1.5.
The line: System.out.println("Returncode: " + ret); should print:
Returncode: 1
but it is printing:
Returncode: 10709
What am I doing wrong? Am I doing something wrong or is it an implementation problem?
I did a dump with Ethereal/Wireshark, but it did not work.
<One OS to rule them all,
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20060802/91cc6e54/attachment.htm
NamingContext nc =
NamingContextHelper.narrow(orb.resolve_initial_references(
"NameService"));
if(nc == null)
System.out.println("nc is NULL");
else
System.out.println("nc is not NULL");
NameComponent[] name = new NameComponent[1];
name[0] = new NameComponent("Login","Object");
org.omg.CORBA.Object o = nc.resolve(name);
CommunicationServer.Login l = LoginHelper.narrow(o);
if (l != null)
{
System.out.println("It's working.");
short ret = l.log_in(username, password);
System.out.println("Retruncode: " + ret);
} else
System.out.println("Not in the naming context");
Server:
CORBA::Short Login_impl::log_in (const char * user, const char * password)
{
std::cout << "Login_impl::log_in" << std::endl;
system("touch /tmp/login_impl");
CORBA::Short ret;
ret = 1;
return m_return;
}
I used omniORB in the actual release version; the java client has been done with jdk 1.5.
The line: System.out.println("Returncode: " + ret); should print:
Returncode: 1
but it is printing:
Returncode: 10709
What am I doing wrong? Am I doing something wrong or is it an implementation problem?
I did a dump with Ethereal/Wireshark, but it did not work.
<One OS to rule them all,
One OS to find them,
<One OS to bring them alland in the darkness bind them.
-------------- next part --------------An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20060802/91cc6e54/attachment.htm