cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1413497 - /cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
Date Mon, 26 Nov 2012 08:08:16 GMT
Author: ffang
Date: Mon Nov 26 08:08:15 2012
New Revision: 1413497

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

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java?rev=1413497&r1=1413496&r2=1413497&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamReader.java Mon Nov 26
08:08:15 2012
@@ -367,6 +367,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;
     }
@@ -388,7 +391,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