Retrieving the result set

To retrieve the result set, you must instantiate the stub and call the component method that returns a result set to the client. This example instantiates the stub from the Java component in the Test package in a session as an object p of type Ping_var using the _narrow method. The component method, results() is called on p which returns the result set rs.

 Ping_var p = Ping::_narrow(Object_var(session->create("Test/Java"))); 
   ResultSet_var rs = p->results();