[Enterprise Extensions only]
  Previous topic

Creating CORBA client main code (client .cpp), adding code to call methods on the servant object

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 );

This task is one step of the parent task to create the CORBA client main code, as described in Creating a CORBA client main code (client.cpp).

For example,
...
liptr = servant::_narrow( objPtr);
...
cout << "Logging to file " << liptr->getFileName() << endl;
liptr->setFileName( argv[1] );
cout << "Now logging to file " << liptr->getFileName() << endl;

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 Creating CORBA client main code (client.cpp), adding code to stop the client and release resources.

  Previous topic