2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
8 parse_args (int argc
, ACE_TCHAR
*argv
[])
10 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:x"));
13 while ((c
= get_opts ()) != -1)
17 ior
= get_opts
.opt_arg ();
26 ACE_ERROR_RETURN ((LM_ERROR
,
34 // Indicates successful parsing of the command line
39 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
44 CORBA::ORB_init (argc
, argv
);
46 if (parse_args (argc
, argv
) != 0)
49 CORBA::Object_var tmp
=
50 orb
->string_to_object(ior
);
52 Test::Hello_var hello
=
53 Test::Hello::_narrow(tmp
.in ());
55 if (CORBA::is_nil (hello
.in ()))
57 ACE_ERROR_RETURN ((LM_DEBUG
,
58 "Nil Test::Hello reference <%s>\n",
63 CORBA::String_var the_string
=
66 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - string returned <%C>\n",
76 catch (const CORBA::Exception
& ex
)
78 ex
._tao_print_exception ("Exception caught:");