cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterjo...@apache.org
Subject svn commit: r499178 - in /incubator/cxf/trunk: tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java tools2/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
Date Tue, 23 Jan 2007 23:03:20 GMT
Author: peterjones
Date: Tue Jan 23 15:03:19 2007
New Revision: 499178

URL: http://svn.apache.org/viewvc?view=rev&rev=499178
Log:
Minor fix for WSDL11Validator for ibm jdk.
The validation tests fail with the ibm jdk, because it seems to have
problems finding the default imported schemas from their jar.  If we
set the system id of the input sources to the resolved absolute path
(i.e. includes jar:...) rather than just the relative path of the
schemas, the tests pass.

Modified:
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
    incubator/cxf/trunk/tools2/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java?view=diff&rev=499178&r1=499177&r2=499178
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
(original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
Tue Jan 23 15:03:19 2007
@@ -131,7 +131,14 @@
                     URIResolver resolver = new URIResolver(ele.getName());
                     if (resolver.isResolved()) {
                         InputSource is = new InputSource(resolver.getInputStream());
-                        is.setSystemId(ele.getName());
+                        // Use the resolved URI of the schema if available.
+                        // The ibm jdk won't resolve the schema if we set
+                        // the id to the relative path.
+                        if (resolver.getURI() != null) {
+                            is.setSystemId(resolver.getURI().toString());
+                        } else {
+                            is.setSystemId(ele.getName());
+                        }
                         xsdList.add(is);
                     }
                 }

Modified: incubator/cxf/trunk/tools2/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java?view=diff&rev=499178&r1=499177&r2=499178
==============================================================================
--- incubator/cxf/trunk/tools2/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
(original)
+++ incubator/cxf/trunk/tools2/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
Tue Jan 23 15:03:19 2007
@@ -131,7 +131,14 @@
                     URIResolver resolver = new URIResolver(ele.getName());
                     if (resolver.isResolved()) {
                         InputSource is = new InputSource(resolver.getInputStream());
-                        is.setSystemId(ele.getName());
+                        // Use the resolved URI of the schema if available.
+                        // The ibm jdk won't resolve the schema if we set
+                        // the id to the relative path.
+                        if (resolver.getURI() != null) {
+                            is.setSystemId(resolver.getURI().toString());
+                        } else {
+                            is.setSystemId(ele.getName());
+                        }
                         xsdList.add(is);
                     }
                 }



Mime
View raw message