camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Amon <>
Subject Re: DefaultCxfRsBinding only uses Exchange.getOut()
Date Wed, 11 Dec 2013 17:02:12 GMT
Hi Sergey,

i created a JIRA (
<>  ).

Sergey Beryozkin-3 wrote
> What I'm not understanding yet is what kind of response you actually get 
> if IN message is checked ?

The problem in my case is that the last action of the TryProcessor is moving
the out message to the in message, thus setting the out message to null.
Now when the CxfRsInvokers returnResponse method is called, which populates
the response using the DefaultCxfRsBinding (calling
cxfExchange))the exchange looks like:

    in : [MyPayload]
    out : null

and the DefaultCxfRsBinding currently only uses the out message and if the
out message is null cxfrs returns  the http response code 204.

When removing the <doTry> block the exchange that arrives at the
DefaultCxfRsBinding looks like:

    in : [MyPayload]
    out : [MyPayload]

an everything is fine.

Sergey Beryozkin-3 wrote
> I'm also slightly concerned that if if we have roots explicitly checking 
> for 204 (or indeed roots dealing with HTTP responses having no actual 
> body) then this patch might affect them ?

Hmm, the Camel FAQ is saying that only using the in message should be fine: 
Camel FAQ

But maybe in some circumstances it will affect some routes, I have to think
about it.

Sergey Beryozkin-3 wrote
> May be, in case of CXF RS binding, checking IN should be optional, 
> example, if an exchange property is set allowing for it then do it, 
> otherwise not. What do you think ?

Well, in my opinion it should in every case be consintent to the
DefaultCxfBinding. If it is made optional which I think is not a bad idea it
should be made optional for both DefaultCxfBinding and DefaultCxfRsBinding.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message