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
[])
15 CORBA::ORB_init (argc
, argv
);
17 if (parse_args (argc
, argv
) != 0)
20 CORBA::Object_var tmp
=
21 orb
->string_to_object (ior
);
23 Test::Echo_Caller_var server
=
24 Test::Echo_Caller::_narrow (tmp
.in ());
26 if (CORBA::is_nil (server
.in ()))
28 ACE_ERROR_RETURN ((LM_DEBUG
,
29 "Nil Test::Echo_Caller reference <%s>\n",
38 catch (const CORBA::Exception
& ex
)
40 ex
._tao_print_exception ("Exception caught:");
48 parse_args (int argc
, ACE_TCHAR
*argv
[])
50 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:"));
53 while ((c
= get_opts ()) != -1)
57 ior
= get_opts
.opt_arg ();
62 ACE_ERROR_RETURN ((LM_ERROR
,
69 // Indicates successful parsing of the command line