cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1526678 - /cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptor.java
Date Thu, 26 Sep 2013 21:00:30 GMT
Author: dkulp
Date: Thu Sep 26 21:00:30 2013
New Revision: 1526678

URL: http://svn.apache.org/r1526678
Log:
[CXF-5294] Write all the detail elements out.
Patch from Jens Granseuer applied

Modified:
    cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptor.java

Modified: cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptor.java?rev=1526678&r1=1526677&r2=1526678&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptor.java
(original)
+++ cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLFaultOutInterceptor.java
Thu Sep 26 21:00:30 2013
@@ -23,12 +23,12 @@ import java.util.ResourceBundle;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
+import org.w3c.dom.Element;
 import org.w3c.dom.Node;
 
 import org.apache.cxf.binding.xml.XMLConstants;
 import org.apache.cxf.binding.xml.XMLFault;
 import org.apache.cxf.common.i18n.BundleUtils;
-import org.apache.cxf.helpers.DOMUtils;
 import org.apache.cxf.helpers.NSStack;
 import org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor;
 import org.apache.cxf.interceptor.Fault;
@@ -74,10 +74,15 @@ public class XMLFaultOutInterceptor exte
             // call StaxUtils to write Fault detail.
             
             if (xmlFault.getDetail() != null) {
+                Element detail = xmlFault.getDetail();
                 StaxUtils.writeStartElement(writer, prefix, XMLFault.XML_FAULT_DETAIL,
                         XMLConstants.NS_XML_FORMAT);
-                StaxUtils.writeNode(DOMUtils.getChild(xmlFault.getDetail(), Node.ELEMENT_NODE),

-                                    writer, false);
+                
+                Node node = detail.getFirstChild();
+                while (node != null) {
+                    StaxUtils.writeNode(node, writer, false);
+                    node = node.getNextSibling();
+                }
                 writer.writeEndElement();
             }
             // fault root



Mime
View raw message