Author: dkulp
Date: Thu Feb 21 17:58:18 2008
New Revision: 630066

URL: http://svn.apache.org/viewvc?rev=630066&view=rev
Log:
Remove complicated xpath code that is not needed to find the wsdl:definition 
node that would always be the root node anyway.
Has the side effect of fixing CXF-1439

Modified:
    
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java

Modified: 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java?rev=630066&r1=630065&r2=630066&view=diff
==============================================================================
--- 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
 (original)
+++ 
incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java
 Thu Feb 21 17:58:18 2008
@@ -252,16 +252,25 @@
         }
 
         if (isGlobaleBindings(bindings)) {
-            String pfx = targetNode.getPrefix();
-            if (pfx == null) {
-                pfx = "";
-            } else {
-                pfx += ":";
-            }
-
             nodeSelector.addNamespaces(wsdlNode);
+            if (targetNode != wsdlNode) {
+                nodeSelector.addNamespaces(targetNode);
+            }
+            /*
+            String pfx = 
nodeSelector.getNamespaceContext().getPrefix(targetNode.getNamespaceURI());
+            int count = 0;
+            while (StringUtils.isEmpty(pfx)) {
+                pfx = "wsdl" + (count == 0 ? "" : count);
+                if (nodeSelector.getNamespaceContext().getNamespaceURI(pfx) != 
null) {
+                    count++;
+                }
+            }
+            pfx += ":";
             Node node = nodeSelector.queryNode(targetNode, "//" + pfx + 
"definitions");
-            copyBindingsToWsdl(node, bindings, 
nodeSelector.getNamespaceContext());
+            */
+
+            
+            copyBindingsToWsdl(targetNode, bindings, 
nodeSelector.getNamespaceContext());
         }
 
         if (isJAXWSBindings(bindings) && bindings.getAttributeNode("node") != 
null) {


Reply via email to