Hi,
You can get the content-type and response code with below code example
in Camel 1.x .
Map context = (Map)exchange.getIn().getHeaders().get("ResponseContext");
assertNotNull("Expect to get the protocal header ",
context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS"));
Map protocalHeaders = (Map)
context.context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS");
String contentType = protocalHeaders.get("content-type");
int responseCode =
context.get("org.apache.cxf.message.Message.RESPONSE_CODE");
In Camel 2.0, you can get the context-type directly from the message header.
Willem
Marc Giger wrote:
> Hi all,
>
> I'm missing the content-type http response header in camel-cxf 1.6
> (cxf:bean:localEndpoint?dataFormat=MESSAGE)
>
> HTTP/1.1 200 OK
> Content-Length: 4648
> Server: Jetty(6.1.10)
>
> or
>
> HTTP/1.1 500 Internal Server Error
> Content-Length: 253
> Server: Jetty(6.1.10)
>
> What do I have to do to get it back?:-)
> I've lost the overview...
>
> Thanks a lot!
>
> Marc
>
>