@ComponentProfile(summary="Change the character encoding of a message based on the XML charset",
tag="service,xml,encoding")
public class UseXmlCharsetAsEncodingService
extends ServiceImp
This service does nothing with the data, but simply changes the character encoding associated with the message using
AdaptrisMessage.setCharEncoding(String) after parsing the XML via XMLStreamReader. If there is
no encoding specified via XMLStreamReader.getCharacterEncodingScheme() then no change occurs.
In the adapter configuration file this class is aliased as use-xml-charset-as-encoding which is the preferred alternative to the fully qualified classname when building your configuration.
log| Constructor and Description |
|---|
UseXmlCharsetAsEncodingService() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
protected void |
initService() |
void |
prepare()
Prepare for initialisation.
|
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stoppublic void doService(AdaptrisMessage msg) throws ServiceException
ServiceApply the service to the message.
msg - the AdaptrisMessage to processServiceException - wrapping any underlying Exceptionsprotected void initService()
throws CoreException
initService in class ServiceImpCoreExceptionprotected void closeService()
closeService in class ServiceImppublic void prepare()
throws CoreException
ComponentLifecycleExtensionCoreException