[omniORB] Interoperability Problem omniorb c++ server and java client (j2se) - idl from sun

Markus Sabin msabin at digithurst.de
Thu Aug 3 10:15:21 BST 2006


Hi Sebastian,

stupid question: What happens if you return ret instead of m_return?

Regards

Markus

Sebastian Bickel wrote:

> 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,
>>One OS to find them,
> <One OS to bring them all
>>and in the darkness bind them.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>omniORB-list mailing list
>omniORB-list at omniorb-support.com
>http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>  
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20060803/0e0613b4/attachment.htm


More information about the omniORB-list mailing list