Hi Willem, How to get the headers in a route is not the problem but how to send specific headers back to the client. I saw there is a new mechanism in camel 1.6 to filter specific headers. E.g. CxfHeaderFilterStrategy. How can I apply a customized filter strategy to the spring-declared endpoints?
Thanks Marc On Tue, 05 May 2009 11:03:32 +0800 Willem Jiang <[email protected]> wrote: > 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 > > > > -- itServe AG Marc Giger Länggassstrasse 26 3000 Bern 9 Tel.: +41 31 305 16 16 Fax: +41 31 305 16 17 Direkt +41 31 305 43 27 Email [email protected] http://www.itserve.ch
