To add a new message mapper, you must manually add it to the group of message mappers in the instance_name.xml configuration file. To add a new message mapper, do the following:
- Open the instance_name.xml configuration file.
- Locate the component with the name MessageMapperGroup.
Between the property tags of that component, add the following XML node to define your message mapper:
<MessageMapper messageMapperId="new mapper id(e.g.-4)" classname="class inplementing MessageMapper interface" enable="true" name="Name of Message Mapper"> <configuration EcSystemTemplateFile="mapping.xml" EcInboundMessageDtdFiles="something.dtd" EcTemplatePath="E:\users\user\test\map" EcSaxParserClass="org.apache.xerces.parsers.SAXParser" EcInboundMessageDtdPath="E:\users\user\test\dtd" isValidating="false"/> </MessageMapper>
Within the configuration node of the message mapper, add any extra configuration parameters needed for the message mapper. This is converted into a TypedProperty object and passes to the init method of the message mapper. The following is an example of extra parameters that might be added:
<configuration EcSystemTemplateFile="mapping.xml" EcInboundMessageDtdFiles="something.dtd" EcTemplatePath="E:\users\user\test\map" EcSaxParserClass="org.apache.xerces.parsers.SAXParser" EcInboundMessageDtdPath="E:\users\user\test\dtd" isValidating="false"/>
Note: In order to have your message mappers function properly, ensure that you are using the newer implementation class name of the XML parser, EcSaxParserClass="org.apache.xerces.parsers.SAXParser".