cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/2] cxf git commit: Allow file protocol for SchemaValidator. It's a command line tool, not sure if all the secure processing even makes sense but test fail without allowing file.
Date Fri, 06 Nov 2015 19:35:09 GMT
Allow file protocol for SchemaValidator.  It's a command line tool, not sure if all the secure
processing even makes sense but test fail without allowing file.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ced98c6e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ced98c6e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ced98c6e

Branch: refs/heads/master
Commit: ced98c6e937bd93f92dac9043fa0406c696bfd84
Parents: 39851b8
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Nov 6 14:34:15 2015 -0500
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Nov 6 14:34:15 2015 -0500

----------------------------------------------------------------------
 .../org/apache/cxf/tools/validator/internal/SchemaValidator.java   | 2 +-
 .../java/org/apache/cxf/tools/validator/WSDLValidationTest.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ced98c6e/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
----------------------------------------------------------------------
diff --git a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
index c8e80e1..d8d09cc 100644
--- a/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
+++ b/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/SchemaValidator.java
@@ -126,6 +126,7 @@ public class SchemaValidator extends AbstractDefinitionValidator {
 
         SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
         sf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE);
+        sf.setProperty(XMLConstants.ACCESS_EXTERNAL_SCHEMA, "file");
         SchemaResourceResolver resourceResolver = new SchemaResourceResolver();
 
         sf.setResourceResolver(resourceResolver);
@@ -354,7 +355,6 @@ class SchemaResourceResolver implements LSResourceResolver {
     private LSInput loadLSInput(String ns) {
         String path = ToolConstants.CXF_SCHEMAS_DIR_INJAR + NSFILEMAP.get(ns);
         URL url = getClass().getClassLoader().getResource(path);
-        System.out.println(url);
         LSInput lsin = new LSInputImpl();
         lsin.setSystemId(url.toString());
         try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/ced98c6e/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
----------------------------------------------------------------------
diff --git a/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
b/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
index 2e34f3d..c1c36ee 100644
--- a/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
+++ b/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
@@ -110,7 +110,7 @@ public class WSDLValidationTest extends ToolTestBase {
                                       getLocation("/validator_wsdl/hello_world_import.wsdl")};
         WSDLValidator.main(args);
         
-        assertTrue("Is not valid wsdl!: " + getStdOut(),
+        assertTrue("Is not valid wsdl!: " + getStdOut() + "\n" + getStdErr(),
                    getStdOut().indexOf("Passed Validation") > -1);
     }
 


Mime
View raw message