summaryrefslogtreecommitdiff
path: root/TAO/tests/IDL_Inherited_Operation/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/IDL_Inherited_Operation/client.cpp')
-rw-r--r--TAO/tests/IDL_Inherited_Operation/client.cpp53
1 files changed, 53 insertions, 0 deletions
diff --git a/TAO/tests/IDL_Inherited_Operation/client.cpp b/TAO/tests/IDL_Inherited_Operation/client.cpp
new file mode 100644
index 00000000000..77c06765b20
--- /dev/null
+++ b/TAO/tests/IDL_Inherited_Operation/client.cpp
@@ -0,0 +1,53 @@
+// $Id$
+
+#include "InheritedOpC.h"
+
+const ACE_TCHAR *ior = ACE_TEXT ("file://test.ior");
+
+int
+ACE_TMAIN (int argc, ACE_TCHAR *argv[])
+{
+ CORBA::ORB_var orb;
+ Outer::Derived_var target;
+
+ try
+ {
+ orb = CORBA::ORB_init (argc, argv);
+
+ CORBA::Object_var tmp = orb->string_to_object (ior);
+
+ target = Outer::Derived::_narrow (tmp.in ());
+
+ if (CORBA::is_nil (target.in ()))
+ {
+ ACE_ERROR_RETURN ((LM_DEBUG,
+ ACE_TEXT ("Nil Outer::Derived ")
+ ACE_TEXT ("reference <%s>\n"),
+ ior),
+ 1);
+ }
+
+ target->BaseOp ();
+ target->shutdown ();
+
+ orb->destroy ();
+ }
+ catch (const CORBA::BAD_OPERATION&)
+ {
+ ACE_ERROR ((LM_ERROR,
+ ACE_TEXT ("client - target operation ")
+ ACE_TEXT ("BaseOp returned BAD_OPERATION\n")));
+ target->shutdown ();
+ orb->destroy ();
+ return 1;
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("client - Exception caught:");
+ target->shutdown ();
+ orb->destroy ();
+ return 1;
+ }
+
+ return 0;
+}