Author: slaws
Date: Mon Jan  9 12:24:52 2012
New Revision: 1229110

URL: http://svn.apache.org/viewvc?rev=1229110&view=rev
Log:
TUSCANY-4004 - maintain the imported WSDL location separately from the WSDL URI 
making them consistent with how the top level WSDL fields are set. 

Modified:
    
tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java

Modified: 
tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
URL: 
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java?rev=1229110&r1=1229109&r2=1229110&view=diff
==============================================================================
--- 
tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
 (original)
+++ 
tuscany/sca-java-2.x/trunk/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
 Mon Jan  9 12:24:52 2012
@@ -444,7 +444,7 @@ public class WSDLModelResolver implement
                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 implement
                        
                        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()) {


Reply via email to