1 #include "Messenger_i.h"
3 int ACE_TMAIN (int, ACE_TCHAR
**)
6 // Construct a Messenger object and use it "as if" it's a corba object.
7 // Put it into CORBA object reference
8 // comparable to activation, narrow, etc.
9 Messenger_var
messenger(new Messenger_i
);
11 // Send a message the the Messenger object.
12 CORBA::String_var message
= CORBA::string_dup ("Hello!");
13 messenger
->send_message("TAO User", "TAO Test", message
.inout());
15 // Print the Messenger's reply.
16 std::cout
<< "Reply: " << message
.in() << std::endl
;
18 catch(const CORBA::Exception
& ex
) {
19 std::cerr
<< "Caught CORBA::Exception : " << ex
<< std::endl
;