ProducerTemplate doenst honor exchange pattern when it extracts the result
--------------------------------------------------------------------------
Key: CAMEL-696
URL: https://issues.apache.org/activemq/browse/CAMEL-696
Project: Apache Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 1.3.0
Reporter: Claus Ibsen
Assignee: Claus Ibsen
Fix For: 1.4.0
The code the extracts the result that is returned when you use the sendXXX,
requestXXX methods on the producer template doens't honor the exchange pattern.
{code}
protected Object extractResultBody(E result) {
Object answer = null;
if (result != null) {
Message out = result.getOut(false);
if (out != null) {
answer = out.getBody();
} else {
answer = result.getIn().getBody();
}
}
return answer;
}
{code}
It defaults to preferring out messages all the time. But in some circumstances
the out body could be set to null but the real response is in the in body.
Setting the exchange pattern to InOnly doesn't honor this.
Maybe this ticket is a symptom of the MEP problem that we have in Camel. See
the discussion on the dev forum.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.