2 #include "tao/Object.h"
3 #include "tao/SystemException.h"
4 #include "ace/Get_Opt.h"
6 const ACE_TCHAR
*ior_output_file
= ACE_TEXT("test.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_output_file
= 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 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
41 if (parse_args (argc
, argv
) != 0)
44 CORBA::Object_var tmp
=
45 orb
->string_to_object("iiop://1\"/2$/$3211:2500/EndPoint");
47 catch (const CORBA::INV_OBJREF
&)
49 ACE_DEBUG ((LM_DEBUG
, "Test succeeded\n"));
53 ACE_ERROR ((LM_ERROR
, "Caught invalid exception\n"));
57 // Write dummy file to trigger the test framework we are ready.
58 FILE *output_file
= ACE_OS::fopen (ior_output_file
, "w");
60 ACE_ERROR_RETURN ((LM_ERROR
,
61 "Cannot open output file for writing IOR: %s\n",
64 ACE_OS::fprintf (output_file
, "dummy");
65 ACE_OS::fclose (output_file
);