Why and when to perform this task
After a CORBA client has got access to a servant object, the client can call methods on the servant object. The methods depend entirely on the business functionality of the client, but have the following general syntax:
servant_pointer->method_name( arguments );For example, the following code calls the getFileName() method on the object identified by the liptr object reference and gets the value of the FileName attribute:
... liptr = servant::_narrow( objPtr); ... cout << "Logging to file " << liptr->getFileName() << endl; liptr->setFileName( argv[1] ); cout << "Now logging to file " << liptr->getFileName() << endl;
What to do next
This code forms the main business functionality of the client. When you have added the method calls needed to your client code, the next stage is to add code to shut down the client and release the resources that it uses as described in Adding code to stop the client and release resources.