2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT("file://test.ior");
7 parse_args (int argc
, ACE_TCHAR
*argv
[])
9 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("k:x:"));
12 while ((c
= get_opts ()) != -1)
16 ior
= get_opts
.opt_arg ();
19 do_shutdown
= ACE_OS::atoi (get_opts
.opt_arg ());
23 ACE_ERROR_RETURN ((LM_ERROR
,
31 // Indicates successful parsing of the command line
36 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
41 CORBA::ORB_init (argc
, argv
);
43 if (parse_args (argc
, argv
) != 0)
46 CORBA::Object_var tmp
=
47 orb
->string_to_object(ior
);
49 Test::Hello_var hello
=
50 Test::Hello::_narrow(tmp
.in ());
52 if (CORBA::is_nil (hello
.in ()))
54 ACE_ERROR_RETURN ((LM_DEBUG
,
55 "Nil Test::Hello reference <%s>\n",
60 CORBA::String_var the_string
=
63 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - string returned <%C>\n",
68 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - Going to shutdown server\n"));
74 catch (const CORBA::Exception
& ex
)
76 ex
._tao_print_exception ("Exception caught:");