Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 78724 invoked from network); 5 May 2009 06:27:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 May 2009 06:27:38 -0000 Received: (qmail 38282 invoked by uid 500); 5 May 2009 06:27:38 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 38224 invoked by uid 500); 5 May 2009 06:27:38 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 38214 invoked by uid 99); 5 May 2009 06:27:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 06:27:38 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gigerstyle@gmx.ch designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 05 May 2009 06:25:06 +0000 Received: (qmail invoked by alias); 05 May 2009 06:27:05 -0000 Received: from 80-218-51-175.dclient.hispeed.ch (EHLO yohan.gigerstyle.homelinux.com) [80.218.51.175] by mail.gmx.net (mp019) with SMTP; 05 May 2009 08:27:05 +0200 X-Authenticated: #1226656 X-Provags-ID: V01U2FsdGVkX195ZglCLLh55lSD/zKFyQbWhAyQsLf4WGn7RG+wqz f+hwVtvDVqK/BW Received: from rigi.itserve.ch (nat.itserve.CH [193.247.121.165]) by yohan.gigerstyle.homelinux.com (Postfix) with ESMTPSA id 8E7985827C for ; Tue, 5 May 2009 08:27:04 +0200 (CEST) Date: Tue, 5 May 2009 08:27:03 +0200 From: Marc Giger To: users@camel.apache.org Subject: Re: camel-cxf content-type response header Message-ID: <20090505082703.6d8cdb7f@rigi.itserve.ch> In-Reply-To: <49FFAC84.8090507@gmail.com> References: <20090504170616.36cec9b2@rigi.itserve.ch> <49FFAC84.8090507@gmail.com> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 X-Virus-Checked: Checked by ClamAV on apache.org 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. CxfHeaderFilter= Strategy. How can I apply a customized filter strategy to the spring-declared endpoin= ts? Thanks Marc On Tue, 05 May 2009 11:03:32 +0800 Willem Jiang wrote: > Hi, >=20 > You can get the content-type and response code with below code example > in Camel 1.x . >=20 > Map context =3D (Map)exchange.getIn().getHeaders().get("ResponseContext"= ); > assertNotNull("Expect to get the protocal header ", > context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS")); > Map protocalHeaders =3D (Map) > context.context.get("org.apache.cxf.message.Message.PROTOCOL_HEADERS"); > String contentType =3D protocalHeaders.get("content-type"); > int responseCode =3D > context.get("org.apache.cxf.message.Message.RESPONSE_CODE"); >=20 > In Camel 2.0, you can get the context-type directly from the message head= er. >=20 > Willem >=20 > Marc Giger wrote: > > Hi all, > >=20 > > I'm missing the content-type http response header in camel-cxf 1.6=20 > > (cxf:bean:localEndpoint?dataFormat=3DMESSAGE) > >=20 > > HTTP/1.1 200 OK > > Content-Length: 4648 > > Server: Jetty(6.1.10) > >=20 > > or > >=20 > > HTTP/1.1 500 Internal Server Error > > Content-Length: 253 > > Server: Jetty(6.1.10) > >=20 > > What do I have to do to get it back?:-) > > I've lost the overview... > >=20 > > Thanks a lot! > >=20 > > Marc > >=20 > >=20 --=20 itServe AG Marc Giger L=C3=A4nggassstrasse 26 3000 Bern 9 Tel.: +41 31 305 16 16 Fax: +41 31 305 16 17 Direkt +41 31 305 43 27 Email marc.giger@itserve.ch http://www.itserve.ch