Author: jim.ma
Date: 2011-07-12 00:43:17 -0400 (Tue, 12 Jul 2011)
New Revision: 14672
Modified:
common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java
Log:
[JBPAPP-6247]:Disable DOCTYPEs by default for SOAP messages as well as WSDLs
Modified:
common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java
===================================================================
---
common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java 2011-07-10
14:57:59 UTC (rev 14671)
+++
common/branches/jbossws-common-1.0.0.GA_CP/src/main/java/org/jboss/wsf/common/DOMUtils.java 2011-07-12
04:43:17 UTC (rev 14672)
@@ -74,6 +74,8 @@
private static final String DISABLE_DEFERRED_NODE_EXPANSION =
"org.jboss.ws.disable_deferred_node_expansion";
private static final String DEFER_NODE_EXPANSION_FEATURE =
"http://apache.org/xml/features/dom/defer-node-expansion";
+ private static final String ENABLE_DOCTYPE_DECL =
"org.jboss.ws.enable_doctype_decl";
+ private static final String DISALLOW_DOCTYPE_DECL_FEATURE =
"http://apache.org/xml/features/disallow-doctype-decl";
// All elements created by the same thread are created by the same builder and belong
to the same doc
private static ThreadLocal<Document> documentThreadLocal = new
ThreadLocal<Document>();
@@ -94,6 +96,11 @@
{
factory.setFeature(DEFER_NODE_EXPANSION_FEATURE, false);
}
+
+ if (Boolean.getBoolean(ENABLE_DOCTYPE_DECL))
+ {
+ factory.setFeature(DISALLOW_DOCTYPE_DECL_FEATURE, true);
+ }
}
catch (ParserConfigurationException pce)
{
Show replies by date