-
WebLogic creates a jar file named
_wl_cls_gen.jar
for wrapping all the contents in theWEB-INF/classes
folder. The zip protocol is used to access the XML schema and blocked by the Spring WS. This build allows all access with any protocol used by the WebLogic.Failed to read schema document 'request.xsd', because 'zip' access is not allowed due to restriction set by the accessExternalSchema property. "
- All changes applied to the spring-xml library only.
spring-xml/src/main/java/org/springframework/xml/DocumentBuilderFactoryUtils.java
@@ -39,15 +39,15 @@ public static DocumentBuilderFactory newInstance() {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
- factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+ factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "all");
} catch (IllegalArgumentException e) {
if (log.isWarnEnabled()) {
log.warn(XMLConstants.ACCESS_EXTERNAL_DTD + " property not supported by " + factory.getClass().getCanonicalName());
}
}
try {
- factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
+ factory.setAttribute(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "all");
} catch (IllegalArgumentException e) {
if (log.isWarnEnabled()) {
log.warn(XMLConstants.ACCESS_EXTERNAL_SCHEMA + " property not supported by " + factory.getClass().getCanonicalName());
spring-xml/src/main/java/org/springframework/xml/validation/Jaxp15ValidatorFactory.java
@@ -77,15 +77,15 @@ public Jaxp15Validator(Schema schema) {
Validator validator = schema.newValidator();
try {
- validator.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+ validator.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "all");
} catch (SAXNotRecognizedException | SAXNotSupportedException e) {
if (log.isWarnEnabled()) {
log.warn(XMLConstants.ACCESS_EXTERNAL_DTD + " property not supported by " + validator.getClass().getCanonicalName());
}
}
try {
- validator.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "");
+ validator.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "all");
} catch (SAXNotRecognizedException | SAXNotSupportedException e) {
if (log.isWarnEnabled()) {
log.warn(XMLConstants.ACCESS_EXTERNAL_SCHEMA + " property not supported by " + validator.getClass().getCanonicalName());
spring-xml/src/main/java/org/springframework/xml/validation/SchemaFactoryUtils.java
@@ -40,7 +40,7 @@ public static SchemaFactory newInstance(String schemaLanguage) {
SchemaFactory schemaFactory = SchemaFactory.newInstance(schemaLanguage);
try {
- schemaFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "");
+ schemaFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, "all");
} catch (SAXNotRecognizedException | SAXNotSupportedException e) {
if (log.isWarnEnabled()) {
log.warn(XMLConstants.ACCESS_EXTERNAL_DTD + " property not supported by " + schemaFactory.getClass().getCanonicalName());
@@ -49,7 +49,7 @@ public static SchemaFactory newInstance(String schemaLanguage) {
}
try {
- schemaFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "file,jar:file");
+ schemaFactory.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "all");
} catch (SAXNotRecognizedException | SAXNotSupportedException e) {
if (log.isWarnEnabled()) {
log.warn(XMLConstants.ACCESS_EXTERNAL_SCHEMA + " property not supported by " + schemaFactory.getClass().getCanonicalName());