cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/8] git commit: [CXF-5623] If a wsdl imports a schema directly using a wsdl:import instead of wsdl:types/xsd:schema/xsd:import, then try to detect that and use the appropriate schema systemId instead of a generated one.
Date Thu, 20 Mar 2014 17:07:20 GMT
[CXF-5623] If a wsdl imports a schema directly using a wsdl:import instead of wsdl:types/xsd:schema/xsd:import,
then try to detect that and use the appropriate schema systemId instead of a generated one.


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

Branch: refs/heads/2.7.x-fixes
Commit: 9adf4385c408c9409810532930da108983445c28
Parents: b448ab0
Author: Daniel Kulp <dkulp@apache.org>
Authored: Thu Mar 20 11:31:39 2014 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Thu Mar 20 13:04:11 2014 -0400

----------------------------------------------------------------------
 rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9adf4385/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
----------------------------------------------------------------------
diff --git a/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java b/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
index 489a471..0919dfc 100644
--- a/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
+++ b/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
@@ -124,6 +124,14 @@ public final class SchemaUtil {
                             }
                         }
                         String systemId = def.getDocumentBaseURI() + "#types" + schemaCount;
+                        if (def.getDocumentBaseURI() != null
+                            && def.getDocumentBaseURI().toUpperCase().endsWith(".xsd")
+                            && def.getTargetNamespace() == null
+                            && (obj == null 
+                                || !(obj instanceof Schema 
+                                    || !((Schema)obj).getDocumentBaseURI().equals(def.getDocumentBaseURI()))))
{
+                            systemId = def.getDocumentBaseURI();
+                        }
     
                         schemaCol.setBaseUri(def.getDocumentBaseURI());
                         CatalogXmlSchemaURIResolver schemaResolver =


Mime
View raw message