Re: problems with remote NameService calls



Anyone to help me with that ?

/Fabien

According to Fabien Tassin:
> Date: Mon, 31 May 2004 16:25:21 +0200
> 
> Hi,
> 
> I have an Orbit2 client talking to a remote non-Orbit server.
> It works well when used with a (fixed) IOR read with
> client_import_service_from_stream().
> I now wish to use the NameService on the remote ORB to get the IOR
> dynamically.. but it doesn't work.
> 
> Here is a minimalistic piece of code.
> 
> ==
>   /* ... */
>   orb = CORBA_ORB_init(&argc, argv, "orbit-local-orb", ev);
>   abort_if_exception(ev, "CORBA_ORB_init() failed");
> 
>   nameservice = CORBA_ORB_resolve_initial_references(orb, "NameService", ev);
>   abort_if_exception(ev, "resolve_initial_references(NameService) failed");
> 
>   context = (CosNaming_NamingContext) nameservice;
>   g_assert(!CORBA_Object_is_nil(context, ev));
> 
>   CosNaming_NamingContext_list(context, 0, &bl, &bi, ev);
>   abort_if_exception(ev, "list() failed");
>   g_assert(!CORBA_Object_is_nil(bi, ev));
>   /* ... */
> ==
> 
> I invoke this using -ORBInitRef NameService=corbaloc::remote:port/NameService
> It goes into an infinite loop in CosNaming_NamingContext_list().
> 
> ethereal+strace show that the CORBA_ORB_resolve_initial_references() call is
> not made against the remote ORB but against the local one (from my
> Gnome2 desktop, reading /tmp/orbit-myuser).
> CosNaming_NamingContext_list() talks to the remote ORB but loops..
> [ Request (two-way): list -> Reply: Location Forward ]
> I assume this is because 'nameservice' is wrong.
> 
> I'm quite sure it is a problem with my client code (or Orbit2)
> as 'nameclt' from omniorb4 works perfectly.
> (nameclt -ORBInitRef NameService=corbaloc::remote:port/NameService list)
> 
> Maybe I missed something or did something wrong..
> 
> $ orbit2-config --version
> ORBit2 2.10.2
> 
> Thoughts ?
> 
> /Fabien
> _______________________________________________
> orbit-list mailing list
> orbit-list gnome org
> http://mail.gnome.org/mailman/listinfo/orbit-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]