Author: ajith
Date: Tue May 16 09:34:55 2006
New Revision: 406982

URL: http://svn.apache.org/viewcvs?rev=406982&view=rev
Log:
fixing an issue in the StreamingOMSerializer (caused due to the returning of 
null to empty namepace)

Modified:
    
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.java

Modified: 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.java
URL: 
http://svn.apache.org/viewcvs/webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.java?rev=406982&r1=406981&r2=406982&view=diff
==============================================================================
--- 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.java
 (original)
+++ 
webservices/commons/trunk/modules/axiom/src/org/apache/axiom/om/impl/serialize/StreamingOMSerializer.java
 Tue May 16 09:34:55 2006
@@ -211,6 +211,14 @@
         for (int i = 0; i < count; i++) {
             prefix = reader.getAttributePrefix(i);
             namespaceName = reader.getAttributeNamespace(i);
+            /*
+               Due to parser implementations returning null as the namespace 
URI
+              (for the empty namespace) we need to make sure that we deal with
+              a namespace name that is not null. The best way to work around 
this
+              issue is to set the namespace uri to "" if it is null
+            */
+            if (namespaceName==null) namespaceName="";
+            
             writerPrefix 
=writer.getNamespaceContext().getPrefix(namespaceName);
 
             if (!"".equals(namespaceName)){


Reply via email to