cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r814100 - /cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Date Sat, 12 Sep 2009 01:15:11 GMT
Author: dkulp
Date: Sat Sep 12 01:15:10 2009
New Revision: 814100

URL: http://svn.apache.org/viewvc?rev=814100&view=rev
Log:
Make sure sys id is set during validation

Modified:
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=814100&r1=814099&r2=814100&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Sat Sep 12 01:15:10 2009
@@ -383,10 +383,9 @@
                     throw new RuntimeException(e);
                 }
                 Element ele = docs[0].getDocumentElement();
-    
                 ele = removeImportElement(ele);
                 if (context.get(ToolConstants.CFG_VALIDATE_WSDL) != null) {
-                    validateSchema(ele);
+                    validateSchema(ele, docs[0].getDocumentURI());
                 }           
                 InputSource is = new InputSource((InputStream)null);
                 //key = key.replaceFirst("#types[0-9]+$", "");
@@ -431,7 +430,7 @@
                 Element ele = sci.getElement();
                 ele = removeImportElement(ele);
                 if (context.get(ToolConstants.CFG_VALIDATE_WSDL) != null) {
-                    validateSchema(ele);
+                    validateSchema(ele, sci.getSystemId());
                 }           
                 InputSource is = new InputSource((InputStream)null);
                 //key = key.replaceFirst("#types[0-9]+$", "");
@@ -635,9 +634,9 @@
     }
 
     
-    public void validateSchema(Element ele) throws ToolException {
+    public void validateSchema(Element ele, String uri) throws ToolException {
         SchemaFactory schemaFact = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-        DOMSource domSrc = new DOMSource(ele);
+        DOMSource domSrc = new DOMSource(ele, uri);
         try {
             schemaFact.newSchema(domSrc);
         } catch (SAXException e) {



Mime
View raw message