cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [4/5] 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 15:59:35 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/a16914b0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/a16914b0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/a16914b0

Branch: refs/heads/master
Commit: a16914b0aa649291fff2287e3ebfa7c07d3f83e8
Parents: bf2536f
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 11:49:27 2014 -0400

----------------------------------------------------------------------
 rt/wsdl/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/a16914b0/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
----------------------------------------------------------------------
diff --git a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java b/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
index 489a471..0919dfc 100644
--- a/rt/wsdl/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java
+++ b/rt/wsdl/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