When i add just one mappingmodel then it works perfect but actually i want to add multiple mapping model as i have added onto the following code. Can someone please assist how can i do that.
Smooks-config.xml
<?xml version="1.0"?>
<smooks-resource-list
xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:edi="http://www.milyn.org/xsd/smooks/edi-1.1.xsd">
<edi:reader mappingModel="/example/edi-to-xml-author-full-mapping.xml" />
<edi:reader mappingModel="/example/edi-to-xml-author-full-map.xml" /
</smooks-resource-list>
Test.java
protected static String runSmooksTransform() throws IOException, SAXException, SmooksException {
Locale.setDefault(new Locale("en", "IE"));
Smooks smooks = new Smooks("smooks-config.xml");
try {
ExecutionContext executionContext = smooks.createExecutionContext();
StringResult result = new StringResult();
smooks.filterSource(executionContext, new StreamSource(new ByteArrayInputStream(messageIn)), result);
return result.getResult();
} finally {
smooks.close();
}
}