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::Ping_Service_var ping_service
=
53 Test::Ping_Service::_narrow(tmp
.in ());
55 if (CORBA::is_nil (ping_service
.in ()))
57 ACE_ERROR_RETURN ((LM_DEBUG
,
58 "Nil process reference <%s>\n",
63 for (int i
= 0; i
!= 10; ++i
)
65 ping_service
->ping ();
70 ping_service
->shutdown ();
75 catch (const CORBA::Exception
& ex
)
77 ex
._tao_print_exception ("Exception caught:");