cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r600686 - /incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
Date Mon, 03 Dec 2007 20:57:53 GMT
Author: dkulp
Date: Mon Dec  3 12:57:52 2007
New Revision: 600686

URL: http://svn.apache.org/viewvc?rev=600686&view=rev
Log:
[CXF-1219] Allow use of parsers that don't support validation 

Modified:
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java?rev=600686&r1=600685&r2=600686&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
Mon Dec  3 12:57:52 2007
@@ -112,12 +112,17 @@
         InputStream is = XMLTypeCreator.class.getResourceAsStream(path);
         if (is != null) {
             try {
+                aegisDocumentBuilderFactory = DocumentBuilderFactory.newInstance();
+
+                
                 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 (UnsupportedOperationException e) {
+                //Parsers that don't support schema validation
+                LOG.info("Parser doesn't support setSchema.  Not validating.", e);
             } catch (IOException ie) {
                 LOG.error("Error reading Aegis schema", ie);
             } catch (FactoryConfigurationError e) {



Mime
View raw message