cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1413506 - /cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Date Mon, 26 Nov 2012 08:35:00 GMT
Author: ffang
Date: Mon Nov 26 08:34:59 2012
New Revision: 1413506

URL: http://svn.apache.org/viewvc?rev=1413506&view=rev
Log:
[CXF-4652]Additional namespace is added when web service provider implements Provider<DOMSource>

Modified:
    cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java

Modified: cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java?rev=1413506&r1=1413505&r2=1413506&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
(original)
+++ cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Mon Nov 26 08:34:59 2012
@@ -370,6 +370,9 @@ public class W3CDOMStreamReader extends 
         String ln = getCurrentNode().getLocalName();
         if (ln == null) {
             ln = getCurrentNode().getNodeName();
+            if (ln.indexOf(":") != -1) {
+                ln = ln.substring(ln.indexOf(":") + 1);
+            }
         }
         return ln;
     }
@@ -391,7 +394,12 @@ public class W3CDOMStreamReader extends 
     public String getPrefix() {
         String prefix = getCurrentNode().getPrefix();
         if (prefix == null) {
-            prefix = "";
+            String nodeName = getCurrentNode().getNodeName();
+            if (nodeName.indexOf(":") != -1) {
+                prefix = nodeName.substring(0, nodeName.indexOf(":"));
+            }  else {
+                prefix = "";
+            }
         }
         return prefix;
     }



Mime
View raw message