[ace-users] ACE/TAO: connect TAO 1.5.8 client to older TAO server.
Douglas C. Schmidt
schmidt at dre.vanderbilt.edu
Thu Jun 14 09:08:25 CDT 2007
Hi Michael,
Thanks for using the PRF.
> ACE VERSION: 5.5.8
>
> HOST MACHINE and OPERATING SYSTEM:
> Windows XP Version 5.1 SP2, Winsock 3.10.0.103
>
> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
> The same target.
>
> COMPILER NAME AND VERSION (AND PATCHLEVEL):
> Micros. "Visual Studio 2003" 7.1.6030, SP1
>
> THE $ACE_ROOT/ace/config.h FILE has contents:
> >>>>>>snip
> #define ACE_HAS_STANDARD_CPP_LIBRARY 1
> #include "ace/config-win32.h"
> <<<<<<snap
>
> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE
> is not existant. I use the VS project file to build ACE.
>
> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features
> is not existant. There is only one "default.rel" file.
>
> AREA/CLASS/EXAMPLE AFFECTED:
> My own code fails when it wants to connect to an older
> TAO server (ca. six years old) over ethernet.
Which version of TAO are you trying to interoperate with?
> DOES THE PROBLEM AFFECT:
> COMPILATION? No
> LINKING? No
> EXECUTION? Yes. Maybe ACE is affected, but shurely my application.
>
> SYNOPSIS:
> Connection to an old TAO server does not work. The old server
> has a shorter IOR:xxx than the newer TAO uses as default. It
> fails on _narrow(), which allways returns a nil object after
> timeout of about 10 secs.
>
> DESCRIPTION:
> A simple CORBA client wants to call objects on a remote
> TAO CORBA server over ethernet. This remote server is existant
> binary-only and about six years old.
> The client is written in C++, as is the old server. The original
> C++ IDL file is used to generate the C++ interface files.
> The client does:
> * corba_init()
> * string_to_object() with the correct IOR (is_nil() is false)
> * _narrow()
> The last, _narrow(), allways fails and the object is nil.
> I debugged the session and got this call-stack:
> >>>>snip
> mymain.cpp: nbtc._narrow()
> stu_ConfigServerIDLC.cpp: _narrow()
> Object_t.cpp: narrow() ...if (obj->_is_a(repo_id) == false)...
> (3) Object.cpp: _is_a() ...if (this->_stubobj()->type_id.in() != 0 &&
> ACE_OS::strcmp(type_id,
> this->_stubobj()->type_id.in())
> == 0) return true;
> return this->proxy_broker()->_is_a(this, type_id);
> Object.cpp: proxy_broker() ...if (this->protocol_proxy_) {
> (2) return this->protocol_proxy_->
> object_proxy_broker(); }
> Remote_Object_Proxy_Broker.cpp: _is_a() ...tao_call.invoke(0, 0);
> (1) return _tao_retval.retn();
> ...
> <<<<snap
>
> REPEAT BY: My failing example client code is:
> >>>>>snip
> try {
> CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
> CORBA::Object_var obj;
> obj = orb->string_to_object(argv[1]);
> if (CORBA::is_nil(obj.in())) {
> return 2;
> }
> nbFoodServer::nbFoodServer_var refcli =
> nbFoodServer::nbFoodServer::_narrow(obj.in());
> if (CORBA::is_nil(refcli.in())) {
> // here it fails and returns :-)
> return 3;
> }
> refcli->activateFood(0xa8);
> // ...
> catch(const CORBA::Exception &ex) {
> ex._tao_print_exception("CORBA exception: ");
> return -1;
> }
> <<<<<snap
>
> SAMPLE FIX/WORKAROUND:
> Not available.
>
> Since the documentation for this ProxyBroker class is very small, I
> have no clue what exactly fails and what I could do to make client
> and server compatible.
Hopefully, someone will be able to give you some tips on how to make
things work together. If not, I recommend you contact one of the
companies listed at
http://www.dre.vanderbilt.edu/support.html
for commercial support.
Thanks,
Doug
More information about the Ace-users
mailing list