1 /* Test wether list_initial_services returns an ObjectURL or an ObjectId as
2 * it should be when an ORBInitRef is set.
4 * launch test like this:
5 * <execname> -ORBInitRef MyObjectId=file://myobj.ior
9 #include "tao/Object.h"
10 #include "tao/ObjectIdListC.h"
12 int ACE_TMAIN( int argc
, ACE_TCHAR
* argv
[] )
18 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
20 CORBA::ORB_ObjectIdList_var listsrv
= orb
->list_initial_services();
21 for (CORBA::ULong index
= 0 ; index
< listsrv
->length(); index
++ )
22 if (ACE_OS::strcmp(listsrv
[index
],"MyObjectId") == 0)
27 catch (const CORBA::Exception
& ex
)
29 ex
._tao_print_exception ("Exception caught:");