diff --git a/modules/core/src/main/java/org/apache/synapse/mediators/transform/PayloadFactoryMediator.java b/modules/core/src/main/java/org/apache/synapse/mediators/transform/PayloadFactoryMediator.java index 8f4b00e2fa..ef87351660 100644 --- a/modules/core/src/main/java/org/apache/synapse/mediators/transform/PayloadFactoryMediator.java +++ b/modules/core/src/main/java/org/apache/synapse/mediators/transform/PayloadFactoryMediator.java @@ -84,6 +84,16 @@ public class PayloadFactoryMediator extends AbstractMediator { private static final Log log = LogFactory.getLog(PayloadFactoryMediator.class); public PayloadFactoryMediator() { + //ignore DTDs for XML Input + inputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, Boolean.FALSE); + inputFactory.setProperty(XMLInputFactory.IS_COALESCING, true); + Map props = StAXUtils.loadFactoryProperties("XMLInputFactory.properties"); + if (props != null) { + for (Object o : props.entrySet()) { + Map.Entry entry = (Map.Entry) o; + inputFactory.setProperty((String) entry.getKey(), entry.getValue()); + } + } } /**