diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java b/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java index 34b7ed7bef..bfa882ebf7 100644 --- a/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java +++ b/branches/sca-java-1.x/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGenerator.java @@ -687,6 +687,7 @@ public class Interface2WSDLGenerator { // look for any imports of the no namespace schema Document refSchema = xsDef.getDocument(); NodeList imports = refSchema.getElementsByTagNameNS("http://www.w3.org/2001/XMLSchema","import"); + List<Node> importsToDelete = new ArrayList<Node>(); for (int j = 0; j < imports.getLength(); j++){ Element _import = (Element)imports.item(j); @@ -695,13 +696,18 @@ public class Interface2WSDLGenerator { if (_import.getAttributes().getLength() == 0){ if (xsDef.getNamespace().equals(defaultNamespace)){ // remove the import - _import.getParentNode().removeChild(_import); + //_import.getParentNode().removeChild(_import); + importsToDelete.add(_import); } else { // update the import to refer to the default namespace _import.setAttribute("namespace", defaultNamespace); } } } + + for (Node _import : importsToDelete){ + _import.getParentNode().removeChild(_import); + } // look for any type attributes that refer to the // node being merged |