Skip to content

Commit

Permalink
Merge pull request #2237 from malakaganga/fix_att_max
Browse files Browse the repository at this point in the history
Fix Error while access large xml in PayloadFactory
  • Loading branch information
malakaganga authored Nov 21, 2024
2 parents 63e5ffb + 890ddb6 commit 3c69de2
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}

/**
Expand Down

0 comments on commit 3c69de2

Please sign in to comment.