cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject 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 Tue, 23 Feb 2016 06:48:06 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes b301d5628 -> b47e94df9


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.

(cherry picked from commit ced98c6e937bd93f92dac9043fa0406c696bfd84)


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

Branch: refs/heads/3.1.x-fixes
Commit: b47e94df9752b70e8bd14e6dfebf26285066a2c5
Parents: b301d56
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Nov 6 14:34:15 2015 -0500
Committer: Freeman Fang <freeman.fang@gmail.com>
Committed: Tue Feb 23 14:48:07 2016 +0800

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/b47e94df/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 87bf631..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);

http://git-wip-us.apache.org/repos/asf/cxf/blob/b47e94df/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