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 972029302 for ; Wed, 1 Feb 2012 19:35:16 +0000 (UTC) Received: (qmail 77539 invoked by uid 500); 1 Feb 2012 19:35:16 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 77368 invoked by uid 500); 1 Feb 2012 19:35:15 -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 77360 invoked by uid 99); 1 Feb 2012 19:35:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 19:35:15 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of anand.forums@gmail.com designates 209.85.215.173 as permitted sender) Received: from [209.85.215.173] (HELO mail-ey0-f173.google.com) (209.85.215.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2012 19:35:08 +0000 Received: by eaao14 with SMTP id o14so704591eaa.32 for ; Wed, 01 Feb 2012 11:34:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hMC0rjimfKhYwfVXdLdMnP3wJkiQrvT1NJoF2gZ7vcc=; b=E4H03vtnGEyDF/YjiJVX9fe7FIVJapAdZFfBmJ25i6DkGOV7Zq0XKjarL+Og+s/PhA m7S8oRLdNvnpglXueojgTfiLzOSA/Xrx00PUF6YvliulOFmJHINK/WjivK+DtgS289Id aqd9lducK44zbnG8ekpVLJS/HWiY9FZjFFGrU= MIME-Version: 1.0 Received: by 10.213.22.204 with SMTP id o12mr29770ebb.1.1328124888186; Wed, 01 Feb 2012 11:34:48 -0800 (PST) Received: by 10.14.45.162 with HTTP; Wed, 1 Feb 2012 11:34:48 -0800 (PST) In-Reply-To: References: Date: Wed, 1 Feb 2012 11:34:48 -0800 Message-ID: Subject: Re: reading http endpoint from properties files From: anand sridhar To: users@camel.apache.org Content-Type: multipart/alternative; boundary=0015174c0f1e2d7f9304b7ec2c18 X-Virus-Checked: Checked by ClamAV on apache.org --0015174c0f1e2d7f9304b7ec2c18 Content-Type: text/plain; charset=ISO-8859-1 The Property Place holder did the trick for me. However, I was hoping if I could extend it to read properties from the camel exchange . Any pointers to examples would be welcome. Thanks, Anand On Thu, Jan 26, 2012 at 12:24 AM, Claus Ibsen wrote: > Hi > > See this FAQ > http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html > > Or you can define the endpoint using property placeholders > http://camel.apache.org/using-propertyplaceholder.html > > http://camel.apache.org/how-do-i-use-spring-property-placeholder-with-camel-xml.html > > > On Thu, Jan 26, 2012 at 1:00 AM, anand sridhar > wrote: > > Hi, > > I have a route with the endpoint being a HTTP URL. > > It so happens that this URL is in a properties file. > > > > Could some one help me to understand how I can dynamically load the end > > point name from a property file or in general from header, property > etc..? > > > > apparently, none of these work > > > > from("jms:q1") > > .to("${properties:httpurl}") > > > > or > > from("jms:q1") > > .to(header("httpurl")); > > > > or > > > > from("jms:q1") > > .to(property("httpurl")); > > > > does not resolve even though the httpurl parameter is present in header > as > > well as property. > > > > Thanks, > > Anand > > > > -- > Claus Ibsen > ----------------- > FuseSource > Email: cibsen@fusesource.com > Web: http://fusesource.com > Twitter: davsclaus, fusenews > Blog: http://davsclaus.blogspot.com/ > Author of Camel in Action: http://www.manning.com/ibsen/ > --0015174c0f1e2d7f9304b7ec2c18--