You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/10/27 20:48:26 UTC

[4/4] git commit: [CXF-6034] Fix problems with mapping schema locations to resolvable locations when generating the live wsdl

[CXF-6034] Fix problems with mapping schema locations to resolvable locations when generating the live wsdl


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

Branch: refs/heads/2.7.x-fixes
Commit: ad2a189a1e239cf09678e069fa88c4fd5944ed49
Parents: 01d7f1f
Author: Daniel Kulp <dk...@apache.org>
Authored: Mon Oct 27 15:45:26 2014 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Mon Oct 27 15:48:03 2014 -0400

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java      | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/ad2a189a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java
index e39786e..5539afa 100644
--- a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java
+++ b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetUtils.java
@@ -474,6 +474,9 @@ public class WSDLGetUtils {
                     if (!doneSchemas.containsKey(decodedStart)) {
                         String resolvedSchemaLocation = resolveWithCatalogs(catalogs, start, base);
                         if (resolvedSchemaLocation == null) {
+                            resolvedSchemaLocation = resolveWithCatalogs(catalogs, imp.getSchemaLocationURI(), base);
+                        }                        
+                        if (resolvedSchemaLocation == null) {
                             try {
                                 //check to see if it's already in a URL format.  If so, leave it.
                                 new URL(start);
@@ -485,6 +488,7 @@ public class WSDLGetUtils {
                         } else {
                             if (doneSchemas.put(decodedStart, imp) == null) {
                                 doneSchemas.put(resolvedSchemaLocation, imp);
+                                doneSchemas.put(imp.getSchemaLocationURI(), imp);
                                 updateSchemaImports(bus, imp.getReferencedSchema(), docBase, doneSchemas, base);
                             }
                         }