cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r719273 - /cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/PrettyPrintXMLStreamWriter.java
Date Thu, 20 Nov 2008 16:31:34 GMT
Author: dkulp
Date: Thu Nov 20 08:31:34 2008
New Revision: 719273

URL: http://svn.apache.org/viewvc?rev=719273&view=rev
Log:
Work around issue with Sun stax implementation not liking null namespaces

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/PrettyPrintXMLStreamWriter.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/PrettyPrintXMLStreamWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/PrettyPrintXMLStreamWriter.java?rev=719273&r1=719272&r2=719273&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/PrettyPrintXMLStreamWriter.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/PrettyPrintXMLStreamWriter.java Thu Nov
20 08:31:34 2008
@@ -112,13 +112,13 @@
 
     public void writeAttribute(java.lang.String localName, java.lang.String value)
         throws XMLStreamException {
-        writeAttribute(null, localName, value);
+        baseWriter.writeAttribute(localName, value);
     }
 
     public void writeAttribute(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String value) throws XMLStreamException {
-        writeAttribute(null, namespaceURI, localName, value);
+        baseWriter.writeAttribute(namespaceURI, localName, value);
     }
 
     public void writeAttribute(java.lang.String prefix,
@@ -158,7 +158,7 @@
 
     public void writeEmptyElement(java.lang.String namespaceURI, java.lang.String localName)
         throws XMLStreamException {
-        writeEmptyElement(null, namespaceURI, localName);
+        baseWriter.writeEmptyElement(localName, namespaceURI);
     }
 
     public void writeEmptyElement(java.lang.String prefix,
@@ -238,7 +238,13 @@
             CurrentElement elem = (CurrentElement) elems.peek();
             elem.setChildElements(true);
         }
-        baseWriter.writeStartElement(prefix, localName, namespaceURI);
+        if (prefix == null && namespaceURI == null) {
+            baseWriter.writeStartElement(localName);
+        } else if (prefix == null) {
+            baseWriter.writeStartElement(namespaceURI, localName);            
+        } else {
+            baseWriter.writeStartElement(prefix, localName, namespaceURI);
+        }
         elems.push(new CurrentElement(currElemName));
     }
 



Mime
View raw message