2 #include "ace/Get_Opt.h"
4 const ACE_TCHAR
*ior
= ACE_TEXT("corbaloc:iiop:localhost:12345/Name\\2dwith\\2dhyphens");
5 bool shutdown_server
= false;
8 parse_args (int argc
, ACE_TCHAR
*argv
[])
10 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT("sk:"));
13 while ((c
= get_opts ()) != -1)
17 ior
= get_opts
.opt_arg ();
20 shutdown_server
= true;
24 ACE_ERROR_RETURN ((LM_ERROR
,
31 // Indicates successful parsing of the command line
36 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
42 CORBA::ORB_init (argc
, argv
);
44 if (parse_args (argc
, argv
) != 0)
47 CORBA::Object_var tmp
=
48 orb
->string_to_object(ior
);
51 Test::_narrow(tmp
.in ());
53 if (CORBA::is_nil (server
.in ()))
55 ACE_ERROR_RETURN ((LM_DEBUG
,
56 "Nil Test::Server reference <%s>\n",
61 server
->test_method();
71 catch (const CORBA::Exception
&)