Communicating
with the server is handled by a communication service.
The request is prepared by the service request handlers and the specified
communication service is invoked to send the request to the server.
The response
that is returned by the communication service is given back to the
request
handler so that it can be unmarshalled. This section explains how
to extend
the IBM Sales Center communication service.
Procedure
- Subclass the default
communication service:
package extensions;
import com.ibm.commerce.telesales.services.TsCommunication;
public class ExtendedCommunicationService extends TsCommunication {
public ExtendedCommunicationService() {
System.out.println("ExtendedCommunicationService");
}
}
- Define an extension for the
Communication services extension
point:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="com.ibm.commerce.telesales.configurator">
<configurator path="config"/>
</extension>
<extension
point="com.ibm.commerce.telesales.core.commServices">
<commService
id="extensions.ExtendedCommunicationService"
>
</commService>
</extension>
</plugin>
- Use the system configurator
file to indicate that the new definition
will be used instead of the default definition:
com.ibm.commerce.telesales.services.TsCommunication=extensions.ExtendedCommunicationService