2 #include "tao/DynamicInterface/Request.h"
3 #include "tao/DynamicInterface/Unknown_User_Exception.h"
5 #if !defined(__ACE_INLINE__)
6 #include "test_dsi.inl"
7 #endif /* __ACE_INLINE__ */
10 DSI_Simple_Server::invoke (CORBA::ServerRequest_ptr request
)
12 CORBA::NVList_ptr list
;
13 this->orb_
->create_list (0, list
);
15 request
->arguments (list
);
17 CORBA::Request_var target_request
;
19 this->target_
->_create_request (0, // ctx
20 request
->operation (),
25 target_request
.inout (),
28 target_request
->_tao_lazy_evaluation (1);
30 // Outgoing request must have the same byte order as the incoming one.
31 target_request
->_tao_byte_order (request
->_tao_incoming_byte_order ());
35 // Updates the byte order state, if necessary.
36 target_request
->invoke ();
38 catch (const CORBA::UNKNOWN
&)
40 // Outgoing reply must have the same byte order as the incoming one.
41 request
->_tao_reply_byte_order (target_request
->_tao_byte_order ());
43 request
->gateway_exception_reply (target_request
->raw_user_exception ());
48 // Outgoing reply must have the same byte order as the incoming one.
49 request
->_tao_reply_byte_order (target_request
->_tao_byte_order ());
51 if (ACE_OS::strcmp ("shutdown", request
->operation ()) == 0)
53 this->orb_
->shutdown (0);
58 DSI_Simple_Server::_primary_interface (const PortableServer::ObjectId
&,
59 PortableServer::POA_ptr
)
61 return CORBA::string_dup ("IDL:Simple_Server:1.0");
64 PortableServer::POA_ptr
65 DSI_Simple_Server::_default_POA (void)
67 return PortableServer::POA::_duplicate (this->poa_
.in ());