diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-09 12:24:52 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-09 12:24:52 +0000 |
commit | ba65724b7648a1f81d5dd7fd9649e7824a4b3d22 (patch) | |
tree | ae0d65cd996679cc530b96c08965eaeb393c9e4e /sca-java-2.x | |
parent | 2729709882692f467eb7efd67da251627e18cdc9 (diff) |
TUSCANY-4004 - maintain the imported WSDL location separately from the WSDL URI making them consistent with how the top level WSDL fields are set.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1229110 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java index e58405a8ea..e419179c6e 100644 --- a/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java +++ b/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java @@ -444,7 +444,7 @@ public class WSDLModelResolver implements ModelResolver { if (unresolved.getNamespace().equals(resolved.getDefinition().getTargetNamespace())) { resolved.setNamespace(resolved.getDefinition().getTargetNamespace()); resolved.setUnresolved(false); - resolved.setURI(resolved.getLocation()); + resolved.setURI(unresolved.getURI()); return modelClass.cast(resolved); } } catch (ContributionReadException e) { @@ -524,6 +524,12 @@ public class WSDLModelResolver implements ModelResolver { try { wsdlDefinition.setLocation(new URI(imp.getDefinition().getDocumentBaseURI())); + // TUSCANY-4004 - set the URI of the imported definition to be based on the + // location that the user typed in the import. This will + // usually be a contribution relative URI so it's consistent + // with the URI of the top level WSDL which is set from the + // relative location of the artifact that represents the WSDL + wsdlDefinition.setURI(new URI(imp.getLocationURI())); resolved = resolveImports(WSDLDefinition.class, wsdlDefinition, context); if (!resolved.isUnresolved()) { if (resolved.getImportedDefinitions().isEmpty()) { |