cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r632374 - /incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
Date Fri, 29 Feb 2008 16:18:09 GMT
Author: dkulp
Date: Fri Feb 29 08:18:08 2008
New Revision: 632374

URL: http://svn.apache.org/viewvc?rev=632374&view=rev
Log:
Fix an interaction issue between Aegis and SAAJOutInterceptor

Modified:
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java?rev=632374&r1=632373&r2=632374&view=diff
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementWriter.java
Fri Feb 29 08:18:08 2008
@@ -100,9 +100,18 @@
             String decPrefix = writer.getNamespaceContext().getPrefix(namespace);
 
             // If the user didn't specify a prefix, create one
-            if (StringUtils.isEmpty(prefix) && decPrefix == null) {
-                declare = true;
-                prefix = NamespaceHelper.getUniquePrefix(writer);
+            if (StringUtils.isEmpty(prefix) 
+                && decPrefix == null) {
+               
+                if (!StringUtils.isEmpty(namespace)) {
+                    declare = true;
+                    prefix = NamespaceHelper.getUniquePrefix(writer);
+                } else {
+                    prefix = "";
+                    if (!StringUtils.isEmpty(writer.getNamespaceContext().getNamespaceURI("")))
{
+                        declare = true;
+                    }
+                }
             } else if (StringUtils.isEmpty(prefix)) {
                 prefix = decPrefix;
             } else if (!prefix.equals(decPrefix)) {



Mime
View raw message