Develop an application.
Restart the application server.
Parent
Access telephony services with web services clients
Develop an application to call the web services interface.
Use the following CEA web service APIs to access telephony services with web service clients:
- W3CEndpointReference openSession(CommWsRequest)
- void makeCall(CommWsRequest)
- void endCall()
- void closeSession()
Example
The following example shows how each of the APIs is used. For example, the return value from openSession is very important. It is an endpoint reference that must be used in all other APIs called related to the session monitoring that phone.import com.ibm.ws.commsc.webservice.client.*; ... public class Sample { private ControllerService controllerService = null; private Controller controllerPort = null; private W3CEndpointReference EPR = null; private Controller controllerPortWithEPR = null; // Constructor public Sample() { // Access the web services client controllerService = ControllerService(); if (controllerService!= null) { // Access the port on which main APIs are called controllerPort = controllerService.getControllerPort(); } ... } // Open a session to monitor/control a phone public void openSession(String addressOfRecord, String notifyCallback) { // Build a request object CommWsRequest wsRequest = new CommWsRequest(); wsRequest.setAddressOfRecord(addressOfRecord); wsRequest.setNotifyCallback(notifyCallback); EPR = controllerPort.openSession(wsRequest); controllerPortWithEPR = EPR.getPort(Controller.class, new AddressFeature(true)); } // Make a call public void makeCall(String calleeAddressOfRecord) { // Build a request object CommWsRequest wsRequest = new CommWsRequest(); wsRequest.setPeerAddressOfrecord(calleeAddressOfRecord); // Make the call, using the EPR returned in openSession() controllerPortWithEPR.makeCall(wsRequest); } // End an active call public void endCall() { // End the call, using the EPR returned in openSession() controllerPortWithEPR.endCall(wsRequest); } // Close the session monitoring the phone public void closeSession() { // Close the session, using the EPR returned in openSession() controllerPortWithEPR.closeSession(); } ... }For another example, see the CEA sample application that comes with the CEA feature.
What to do next
Install and start the new application.
Subtopics
- Start an application server
When you start an application server, a new server process starts. This new server process is based on the process definition settings of the current server configuration.
- Directory conventions
References in product information to app_server_root, profile_root, and other directories imply specific default directory locations. Become familiar with the conventions in use for WebSphere Application Server.
Related tasks
Start an application server
Related information:
Directory conventions