3 #include "ace/Get_Opt.h"
5 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:"));
13 while ((c
= get_opts ()) != -1)
17 ior
= get_opts
.opt_arg ();
22 ACE_ERROR_RETURN ((LM_ERROR
,
29 // Indicates successful parsing of the command line
34 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
38 CORBA::ORB_var orb
= CORBA::ORB_init (argc
, argv
);
40 if (parse_args (argc
, argv
) != 0)
43 CORBA::Object_var tmp
= orb
->string_to_object(ior
);
45 ::Skeleton_Inheritance::Interface_3_var if_3
=
46 ::Skeleton_Inheritance::Interface_3::_narrow(tmp
.in ());
48 if (CORBA::is_nil (if_3
.in ()))
50 ACE_ERROR_RETURN ((LM_DEBUG
,
51 "Nil ::Skeleton_Inheritance::Interface_1 "
57 ACE_DEBUG ((LM_DEBUG
, "Invoking operation 3\n"));
58 CORBA::String_var if_result_3
= if_3
->operation_3 ();
59 ACE_DEBUG ((LM_DEBUG
, "Invoking operation 2\n"));
60 CORBA::String_var if_result_2
= if_3
->operation_2 ();
61 ACE_DEBUG ((LM_DEBUG
, "Invoking operation 1\n"));
62 CORBA::String_var if_result_1
= if_3
->operation_1 ();
64 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - strings returned:\n\t<%C>\n\t<%C>\n\t<%C>\n",
69 if (if_3
->_is_a("no_name"))
71 ACE_ERROR ((LM_ERROR
, "ERROR: no_name is known.\n"));
75 ACE_DEBUG ((LM_DEBUG
, "OK: no_name is unknown.\n"));
77 const char * name
= "IDL:Skeleton_Inheritance/Interface_1:1.0";
78 if (if_3
->_is_a(name
))
80 ACE_DEBUG ((LM_DEBUG
, "OK: <%C> is known.\n",
85 ACE_ERROR ((LM_ERROR
, "ERROR: <%C> is unknown\n",
93 catch (const CORBA::Exception
& ex
)
95 ex
._tao_print_exception ("Exception caught:");