cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: svn commit: r600686 - /incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/XMLTypeCreator.java
Date Mon, 03 Dec 2007 23:33:20 GMT
oops "-) 

> -----Original Message-----
> From: dkulp@apache.org [mailto:dkulp@apache.org] 
> Sent: Monday, December 03, 2007 3:58 PM
> To: cxf-commits@incubator.apache.org
> Subject: svn commit: r600686 - 
> /incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/ap
> ache/cxf/aegis/type/XMLTypeCreator.java
> 
> 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/apa
> che/cxf/aegis/type/XMLTypeCreator.java
> 
> Modified: 
> incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apa
> che/cxf/aegis/type/XMLTypeCreator.java
> URL: 
> http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databindin
> g/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/apa
> che/cxf/aegis/type/XMLTypeCreator.java (original)
> +++ 
> incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cx
> +++ f/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