From ba65724b7648a1f81d5dd7fd9649e7824a4b3d22 Mon Sep 17 00:00:00 2001 From: slaws Date: Mon, 9 Jan 2012 12:24:52 +0000 Subject: 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 --- .../tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk/modules/interface-wsdl') 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()) { -- cgit v1.2.3