Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / orbsvcs / tests / Notify / Bug_3646c_Regression / Consumer.cpp
blob6536b945fe9592a9e7613546cae31616b9b2cd77
1 // ******************************************************************
2 // Include Section
3 // ******************************************************************
5 #include "Notify_Test_Client.h"
7 #include "ace/Get_Opt.h"
8 #include "ace/Argv_Type_Converter.h"
10 int
11 ACE_TMAIN (int argc, ACE_TCHAR* argv[])
13 int status = 0;
14 try
16 Notify_Test_Client client;
17 ACE_Argv_Type_Converter argcon (argc, argv);
18 status = client.init (argcon.get_argc (), argcon.get_TCHAR_argv ());
20 if (status == 0)
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"),
27 1);
30 CosNaming::Name name (1);
31 name.length (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: ");
46 status = 1;
49 return status;