tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r620350 - /incubator/tuscany/java/sca/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/java2wsdl/Java2WSDLHelper.java
Date Sun, 10 Feb 2008 22:32:23 GMT
Author: nash
Date: Sun Feb 10 14:32:17 2008
New Revision: 620350

URL: http://svn.apache.org/viewvc?rev=620350&view=rev
Log:
Fixed TUSCANY-2034

Modified:
    incubator/tuscany/java/sca/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/java2wsdl/Java2WSDLHelper.java

Modified: incubator/tuscany/java/sca/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/java2wsdl/Java2WSDLHelper.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/java2wsdl/Java2WSDLHelper.java?rev=620350&r1=620349&r2=620350&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/java2wsdl/Java2WSDLHelper.java
(original)
+++ incubator/tuscany/java/sca/modules/interface-wsdl-java2wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/java2wsdl/Java2WSDLHelper.java
Sun Feb 10 14:32:17 2008
@@ -191,12 +191,14 @@
         while (parent instanceof Element) {
             Element root = (Element)parent;
             NamedNodeMap nodeMap = root.getAttributes();
-            for (int i = 0; i < nodeMap.getLength(); i++) {
-                Attr attr = (Attr)nodeMap.item(i);
-                String name = attr.getName();
-                if ("xmlns".equals(name) || name.startsWith("xmlns:")) {
-                    if (schema.getAttributeNode(name) == null) {
-                        schema.setAttributeNodeNS((Attr)doc.importNode(attr, true));
+            if (nodeMap != null) {  // nodename: #document value: null
+                for (int i = 0; i < nodeMap.getLength(); i++) {
+                    Attr attr = (Attr)nodeMap.item(i);
+                    String name = attr.getName();
+                    if ("xmlns".equals(name) || name.startsWith("xmlns:")) {
+                        if (schema.getAttributeNode(name) == null) {
+                            schema.setAttributeNodeNS((Attr)doc.importNode(attr, true));
+                        }
                     }
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message