HttpMessageComposer#decompose should automatically try to transform message content to String. Otherwise you get status HttpServletResponse.SC_BAD_GATEWAY.
User has to add custom message composer now, e.g.
public class CustomHttpMessageComposer extends HttpMessageComposer {
|
@Override
|
public HttpBindingData decompose(Exchange exchange, HttpBindingData target) throws Exception {
|
exchange.getMessage().setContent(
|
exchange.getMessage().getContent(String.class)
|
);
|
return super.decompose(exchange, target);
|
}
|
}
|
I would check if current object is instance of expected output and if so I would transform the content to String.
|