1 #include "bug_689_regressionC.h"
2 #include "ace/Get_Opt.h"
3 #include "ace/OS_NS_unistd.h"
4 #include "ace/Argv_Type_Converter.h"
6 const ACE_TCHAR
*ior
= ACE_TEXT ("file://server.ior");
9 parse_args (int argc
, ACE_TCHAR
*argv
[])
11 ACE_Get_Opt
get_opts (argc
, argv
, ACE_TEXT ("k:"));
14 while ((c
= get_opts ()) != -1)
18 ior
= get_opts
.opt_arg ();
23 ACE_ERROR_RETURN ((LM_ERROR
,
30 // Indicates successful parsing of the command line
35 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
39 ACE_Argv_Type_Converter
argcon (argc
, argv
);
40 CORBA::ORB_var orb
= CORBA::ORB_init (argcon
.get_argc (),
41 argcon
.get_TCHAR_argv ());
43 if (parse_args (argc
, argv
) != 0)
46 CORBA::Object_var tmp
= orb
->string_to_object (ior
);
48 bug_689_regression_var servant
= bug_689_regression::_narrow(tmp
.in ());
50 if (CORBA::is_nil (servant
.in ()))
52 ACE_ERROR_RETURN ((LM_DEBUG
,
53 "Nil bug_689_regression reference <%s>\n",
61 ACE_Time_Value
tv (0, 500);
66 catch (const CORBA::Exception
& ex
)
68 ex
._tao_print_exception ("Exception caught:");