2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
7 parse_args (int argc
, ACE_TCHAR
*argv
[]);
10 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
13 "Starting shutdown\n"));
17 CORBA::ORB_init (argc
, argv
);
19 if (parse_args (argc
, argv
) != 0)
22 CORBA::Object_var tmp
=
23 orb
->string_to_object(ior
);
25 Test::Echo_Caller_var server
=
26 Test::Echo_Caller::_narrow(tmp
.in ());
28 if (CORBA::is_nil (server
.in ()))
30 ACE_ERROR_RETURN ((LM_DEBUG
,
31 "Nil Test::Echo_Caller reference <%s>\n",
40 catch (const CORBA::Exception
& ex
)
42 ex
._tao_print_exception ("Exception caught:");
50 parse_args (int argc
, ACE_TCHAR
*argv
[])
52 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
55 while ((c
= get_opts ()) != -1)
59 ior
= get_opts
.opt_arg ();
64 ACE_ERROR_RETURN ((LM_ERROR
,
71 // Indicates successful parsing of the command line