Skip to content

Commit

Permalink
[SMX4-1719]NMRDestination would miss return exception in OutIntercept…
Browse files Browse the repository at this point in the history
…orChain in some cases

git-svn-id: https://svn.apache.org/repos/asf/servicemix/smx4/features/trunk@1576230 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ffang committed Mar 11, 2014
1 parent 52a66fd commit 543dda9
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,25 @@ private void commitOutputMessage() throws IOException {
return;
} else {
InputStream bais = getInputStream();
Exchange xchng = inMessage.get(Exchange.class);
if (inMessage.getExchange().getOutFaultMessage() != null
&& inMessage.getExchange().getOutFaultMessage().getContent(Exception.class) != null) {
//check if there is an OutFaultMessage and Exception here first and return the Error fast
Exception ex = inMessage.getExchange().getOutFaultMessage().getContent(Exception.class);
if (ex instanceof org.apache.cxf.interceptor.Fault) {
org.apache.cxf.interceptor.Fault f = (org.apache.cxf.interceptor.Fault)ex;
if (!f.hasDetails()) {
xchng.setError(f);
}
} else {
xchng.setError(ex);
}
channel.send(xchng);
return;
}

StreamSource ss = new StreamSource(bais);

Exchange xchng = inMessage.get(Exchange.class);
LOG.fine(new org.apache.cxf.common.i18n.Message("CREATE.NORMALIZED.MESSAGE", LOG).toString());
if (inMessage.getExchange().getOutFaultMessage() != null) {
Exception ex = inMessage.getContent(Exception.class);
Expand Down

0 comments on commit 543dda9

Please sign in to comment.