1 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
* ior
= 0;
7 parse_args (int argc
, ACE_TCHAR
*argv
[])
9 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
12 while ((c
= get_opts ()) != -1)
16 ior
= get_opts
.opt_arg ();
20 ACE_ERROR_RETURN ((LM_ERROR
,
31 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
37 CORBA::ORB_var orb
= CORBA::ORB_init (argc
,
41 if (::parse_args (argc
, argv
) != 0)
44 // Start out with the first IOR. Interaction with the second
45 // IOR occurs during the various interceptions executed during
47 CORBA::Object_var object
= orb
->string_to_object (ior
);
49 test_var server
= test::_narrow (object
.in ());
51 if (CORBA::is_nil (server
.in ()))
53 ACE_ERROR_RETURN ((LM_ERROR
,
54 "Object reference <%s> is nil.\n",
65 catch (const CORBA::Exception
& ex
)
67 ex
._tao_print_exception ("Caught exception:");