servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1417303 - /servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java
Date Wed, 05 Dec 2012 08:03:50 GMT
Author: ningjiang
Date: Wed Dec  5 08:03:50 2012
New Revision: 1417303

URL: http://svn.apache.org/viewvc?rev=1417303&view=rev
Log:
SMX4-1314  CXF NMR transport throws NPE when it handles the fault message

Modified:
    servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java

Modified: servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java?rev=1417303&r1=1417302&r2=1417303&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java
(original)
+++ servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestinationOutputStream.java
Wed Dec  5 08:03:50 2012
@@ -88,11 +88,11 @@ public class NMRDestinationOutputStream 
                 LOG.fine(new org.apache.cxf.common.i18n.Message("CREATE.NORMALIZED.MESSAGE",
LOG).toString());
                 if (inMessage.getExchange().getOutFaultMessage() != null) {
                     org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)
inMessage.getContent(Exception.class);
-                    if (f.hasDetails()) {
-                        xchng.getFault().setBody(new DOMSource(doc));
-                    } else {
+                    if (!f.hasDetails()) {
                         xchng.setError(f);
                     }
+                    // As the fault is already marshalled by the fault handler
+                    xchng.getFault().setBody(new DOMSource(doc));
                 } else {
                     //copy attachments
                     if (outMessage != null && outMessage.getAttachments() != null)
{



Mime
View raw message