cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r903680 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Date Wed, 27 Jan 2010 15:26:58 GMT
Author: dkulp
Date: Wed Jan 27 15:26:58 2010
New Revision: 903680

URL: http://svn.apache.org/viewvc?rev=903680&view=rev
Log:
[CXF-2628] Fix issues with default namespaces not getting written out.
Patch from Gyorgy Orban applied

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=903680&r1=903679&r2=903680&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Wed Jan
27 15:26:58 2010
@@ -468,18 +468,6 @@
 //        System.out.println("STAXUTILS:writeStartElement : node name : " + local +  " namespace
URI" + uri);
         boolean writeElementNS = false;
         
-     // Write out the element name
-        if (uri != null) {
-            if (prefix.length() == 0 && StringUtils.isEmpty(uri)) {
-                writer.writeStartElement(local);
-            } else {
-                writer.writeStartElement(prefix, local, uri);
-            }
-        } else {
-            writer.writeStartElement(local);
-        }
-
-        
         if (uri != null) {
             writeElementNS = true;
             Iterator<String> it = CastUtils.cast(writer.getNamespaceContext().getPrefixes(uri));
@@ -493,6 +481,17 @@
                 }
             }
         }
+        
+        // Write out the element name
+        if (uri != null) {
+            if (prefix.length() == 0 && StringUtils.isEmpty(uri)) {
+                writer.writeStartElement(local);
+            } else {
+                writer.writeStartElement(prefix, local, uri);
+            }
+        } else {
+            writer.writeStartElement(local);
+        }
 
         // Write out the namespaces
         for (int i = 0; i < reader.getNamespaceCount(); i++) {



Mime
View raw message