1 // ******************************************************************
3 // ******************************************************************
5 #include "Notify_Test_Client.h"
7 #include "ace/Get_Opt.h"
8 #include "ace/Argv_Type_Converter.h"
11 ACE_TMAIN (int argc
, ACE_TCHAR
* argv
[])
16 Notify_Test_Client client
;
17 ACE_Argv_Type_Converter
argcon (argc
, argv
);
18 status
= client
.init (argcon
.get_argc (), argcon
.get_TCHAR_argv ());
22 CosNaming::NamingContext_ptr naming
= client
.naming_context ();
23 if (CORBA::is_nil (naming
))
25 ACE_ERROR_RETURN ((LM_ERROR
,
26 "Can't find naming service\n"),
30 CosNaming::Name
name (1);
32 name
[0].id
= CORBA::string_dup ("Channel1");
33 CORBA::Object_var obj1
= naming
->resolve (name
);
35 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("Successfully retrieved Challel1\n")));
37 name
[0].id
= CORBA::string_dup ("Channel2");
38 CORBA::Object_var obj2
= naming
->resolve (name
);
40 ACE_DEBUG ((LM_DEBUG
, ACE_TEXT("Successfully retrieved Challel2\n")));
43 catch (const CORBA::Exception
& e
)
45 e
._tao_print_exception ("Error: ");