Aegis databinding class XMLTypeCreator uses
DocumentBuilderFactory.setSchema(aegisSchema), this is not implemented by all
XML parsers, some throw UnsupportedOperationException, must be handled
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CXF-1219
URL: https://issues.apache.org/jira/browse/CXF-1219
Project: CXF
Issue Type: Bug
Components: Aegis Databinding
Affects Versions: 2.0.3
Environment: Resin 3.0.23
Reporter: Satish Gudiboina
Fix For: 2.0.3
Aegis databinding class org.apache.cxf.aegis.type.XMLTypeCreator.java has a
static block that was added in CXF 2.0.3:
static {
String path = "/META-INF/cxf/aegis.xsd";
InputStream is = XMLTypeCreator.class.getResourceAsStream(path);
if (is != null) {
try {
SchemaFactory schemaFactory =
SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
aegisSchema = schemaFactory.newSchema(new StreamSource(is));
is.close();
aegisDocumentBuilderFactory =
DocumentBuilderFactory.newInstance();
aegisDocumentBuilderFactory.setSchema(aegisSchema);
} catch (IOException ie) {
LOG.error("Error reading Aegis schema", ie);
} catch (FactoryConfigurationError e) {
LOG.error("Error reading Aegis schema", e);
} catch (SAXException e) {
LOG.error("Error reading Aegis schema", e);
}
}
}
DocumentBuilderFactory.setSchema(Schema) is not implemented by Resin's XML
parser implementation (and other fast XML parsers). Sun's default
implementation is to throw an UnsupportedOperationException. Can this
exception be handled as well by just logging an error. Till then, I am stuck
with CXF 2.0.2 which does not allow http:conduit configuration in Spring files
(this issue was fixed in CXF 2.0.3).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.