Hi Babak, I think your example makes perfect sense and if the exchange pattern is InOnly one should not be able to set the body of the OUT.
If the API is less friendly, then the users will be able to figure out easily what Christian said "the component should check the MEP and put the response into the out message if the MEP is "out capable" or replace the in message if not " Bilgin > > Again my previous stupid example: > > Exchange exchange = new DefaultExchange(new DefaultCamelContext()); > exchange.setPattern(ExchangePattern.InOnly); <== InOnly is already the > default but just to make my intention clear > exchange.getOut().setBody("Camel"); > > Just because of the "too friendly" behaviour of the API we did set the OUT > of an Exchange to something != null ALTHOUGH the exchange pattern was > InOnly! > > Babak > > -- > View this message in context: > http://camel.465427.n5.nabble.com/About-what-to-do-with-the-Response-retrieved-through-a-Producer-when-the-Exchange-is-NOT-out-capable-tp5713946p5714021.html > Sent from the Camel Development mailing list archive at Nabble.com.