Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5618710C87 for ; Wed, 30 Oct 2013 02:27:26 +0000 (UTC) Received: (qmail 45331 invoked by uid 500); 30 Oct 2013 02:27:25 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 45297 invoked by uid 500); 30 Oct 2013 02:27:25 -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 45289 invoked by uid 99); 30 Oct 2013 02:27:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 02:27:25 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of christian.posta@gmail.com designates 209.85.215.41 as permitted sender) Received: from [209.85.215.41] (HELO mail-la0-f41.google.com) (209.85.215.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Oct 2013 02:27:22 +0000 Received: by mail-la0-f41.google.com with SMTP id el20so585410lab.0 for ; Tue, 29 Oct 2013 19:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=3ziGiyZvHFOFPVuadUYr5pmLHThXtYxH5rMEDkr68g8=; b=EtVkcVesG2mSFlFU4i2umvsRenqlanj61h0xCiXIdDy1mD2/NkvthcC6RVb2KshunN F6ZKhg8JbuO4hy28TJt9zcCP+iVI2VlLe2XgpyHcdOb3juH3Qs+uEahqP7Agb+CW6JUt FAFV+gmciAMGK3dBJK4Sy5gtqaiXQzJLqEVaWBAYX9Aw6iYrINAZHwMOStSfftXHWUow WrErF/XZmZfQkcexi2Po51Vn6wRxv7K1xtNoTjEFmvzylp60SqXqF1x992WLDtSK4PNz UlJTUXPrgXDCalJF6mfrU7hC3qd2Abs9foEHHD/sBg4g2MqEazbr8PypcFe/eApe+7Rx z6iQ== MIME-Version: 1.0 X-Received: by 10.152.42.139 with SMTP id o11mr1560136lal.16.1383100020468; Tue, 29 Oct 2013 19:27:00 -0700 (PDT) Received: by 10.114.2.238 with HTTP; Tue, 29 Oct 2013 19:27:00 -0700 (PDT) In-Reply-To: References: <1383096464056-5742364.post@n5.nabble.com> Date: Tue, 29 Oct 2013 19:27:00 -0700 Message-ID: Subject: Re: Message headers and HTTP From: Christian Posta To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org You may wish to also check out the Enrich EIP. You can call into a route or external system, then aggregate the response however you'd like (keeping or discarding headers as you wish) http://camel.apache.org/content-enricher.html On Tue, Oct 29, 2013 at 7:17 PM, Bilgin Ibryam wrote: > Use HeaderFilterStrategy to specify which headers should be sent with the > http request. > It will preserve the headers in the exchange > > Cheers, > > > > On 30 October 2013 01:27, bocamel wrote: > >> In my routes, I use custom message headers to keep track some data. But >> when >> one of the steps in the route is a HTTP call (for example calling a web >> services), all my headers are sent as HTTP headers to the remote HTTP >> server. This causes the remote HTTP server (which is not under my control) >> to return a HTTP 404. (One thing I noticed is that the remote HTTP server >> is perfectly OK with JMS headers, e.g. JMSXGroupID. It just does not like >> any custom message header that I define.) >> >> I know Camel lets me remove all the headers before going to the http >> endpoint. But I still need these header data once the http request >> completes. Any suggestion on how I can use http headers effectively in >> such >> situation? Is there an easy way I can stash away these headers and restore >> them after the http call? I tried to use Exchange properties to keep track >> of the data. But the data do not survive across routes. >> >> Thank you for your help! >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/Message-headers-and-HTTP-tp5742364.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > > > > -- > Bilgin Ibryam > > Apache Camel & Apache OFBiz committer > Blog: ofbizian.com > Twitter: @bibryam > > Author of Instant Apache Camel Message Routing > http://www.amazon.com/dp/1783283475 -- Christian Posta http://www.christianposta.com/blog twitter: @christianposta