Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 404952007D1 for ; Thu, 12 May 2016 09:54:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 3F0A8160939; Thu, 12 May 2016 07:54:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id AC6FB160868 for ; Thu, 12 May 2016 09:54:08 +0200 (CEST) Received: (qmail 27769 invoked by uid 500); 12 May 2016 07:54:07 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Delivered-To: moderator for dev@camel.apache.org Received: (qmail 98075 invoked by uid 99); 11 May 2016 16:20:51 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.486 X-Spam-Level: *** X-Spam-Status: No, score=3.486 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Date: Wed, 11 May 2016 09:20:47 -0700 (MST) From: Kevin-Void To: dev@camel.apache.org Message-ID: <1462983647679-5782455.post@n5.nabble.com> Subject: Dynamic URI based on file name/cfg file MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Thu, 12 May 2016 07:54:09 -0000 Hi Folks, I am trying to pass a *to URI value dynamically* with a property value. That property value will be configured already in the cfg file. When the file name is extracted using *CamelFileNameOnly* header, it has to get passed to the to Uri endpoint. So that the same name is referred in the code. Please find my code below: I have dropped a file with name *KevinFile.txt* in my server location= D:\Servers\jboss-fuse-6.2.0.redhat-133\data\myLocalFTP (file://data/myLocalFTP) *Config File* local.folder.url=file://data/myLocalFTP KevinFile=file://data/KevinFileDirectory *Camel Route* <---Gives the fileName <--This is the spot i am getting error :( *ProcessorClass.java* public class ProcessorClass implements Processor{ @Override public void process(Exchange exchange) throws Exception { String fileName = (String) exchange.getIn().getHeader("CamelFileNameOnly"); exchange.setProperty("myPropertyNew", fileName); } } Thanks in advance. Regards, Kevin -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-URI-based-on-file-name-cfg-file-tp5782455.html Sent from the Camel Development mailing list archive at Nabble.com.