2 #include "Client_Task.h"
5 Client_Task::Client_Task (const ACE_TCHAR
*ior
,
7 ACE_Thread_Manager
*thr_mgr
)
8 : ACE_Task_Base (thr_mgr
)
10 , corb_ (CORBA::ORB::_duplicate (corb
))
22 CORBA::Object_var tmp
=
23 this->corb_
->string_to_object (input_
);
25 Test::HelloAgain_var hello_again
=
26 Test::HelloAgain::_narrow(tmp
.in ());
28 if (CORBA::is_nil (hello_again
.in()))
30 ACE_ERROR_RETURN ((LM_DEBUG
,
31 "Nil Test::HelloAgain reference <%s>\n",
36 CORBA::String_var the_string
= hello_again
->get_string ();
37 if (ACE_OS::strcmp (the_string
.in (), "Hello there!") != 0)
39 ACE_ERROR ((LM_ERROR
, "(%P|%t) - Error, incorrect string returned <%C>\n",
43 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - string from hello_again returned <%C>\n",
45 the_string
= hello_again
->get_string_again ();
47 if (ACE_OS::strcmp (the_string
.in (), "Bye!") != 0)
49 ACE_ERROR ((LM_ERROR
, "(%P|%t) - Error, incorrect string returned <%C>\n",
54 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) - string from hello_again returned <%C>\n",
56 hello_again
->shutdown ();
58 catch (const CORBA::Exception
& ex
)
60 ex
._tao_print_exception ("Exception caught:");