camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aki Yoshida (JIRA)" <>
Subject [jira] [Created] (CAMEL-4452) CXFConsumer may extract the request message as the response message and this can lead to problems
Date Thu, 15 Sep 2011 08:04:08 GMT
CXFConsumer may extract the request message as the response message and this can lead to problems

                 Key: CAMEL-4452
             Project: Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.8.0
            Reporter: Aki Yoshida
             Fix For: 2.8.2, 2.9.0

CAMEL-4030 with Revision 1129070 in trunk changed the way how the response message is retrieved
from the exchange and this is causing some issue.

In particular, the changed code may retrieve the request message as the response message when
the call is oneway (when the condition camelExchange.getPattern().isOutCapable() is false).

Subsequently, this is leading to an NPE when the output operation is used to extract the payload
body from this request message because there is no output operations in the oneway case at:

        for (MessagePartInfo partInfo : boi.getOutput().getMessageParts()) {

and resulting in:

	at org.apache.camel.component.cxf.DefaultCxfBinding.getResponsePayloadList(
	at org.apache.camel.component.cxf.DefaultCxfBinding.populateCxfResponseFromExchange(
	at org.apache.camel.component.cxf.CxfConsumer$1.setResponseBack(
	at org.apache.camel.component.cxf.CxfConsumer$1.syncInvoke(
	at org.apache.camel.component.cxf.CxfConsumer$1.invoke(
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor$
	at java.util.concurrent.Executors$
	at java.util.concurrent.FutureTask$Sync.innerRun(
	at org.apache.cxf.workqueue.SynchronousExecutor.execute(
	at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
	at org.apache.cxf.phase.PhaseInterceptorChain.resume(
	at org.apache.cxf.interceptor.OneWayProcessorInterceptor$
	at org.apache.cxf.workqueue.AutomaticWorkQueueImpl$
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
	at java.util.concurrent.ThreadPoolExecutor$

I see this change was introduced with CAMEL-4030 to support some sort of wire-tap short-cut:


I am not sure how this inbound/outbound switching operation relates to this use case.

But in any case, this new behavior can lead to this problem and  I think the old behavior
(skipping the response message part if there is no response) should be reinstated.

I have a simple test case that can reproduce this problem, but the exception is thrown in
an executor thread and only written to the log and the original test caller thread doesn't
see the exception. So, it's not a useful automatic test case. Maybe, there is a way. Let me
know, how you think.

regards, aki

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message