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 5188B63E2 for ; Thu, 4 Aug 2011 08:00:52 +0000 (UTC) Received: (qmail 39947 invoked by uid 500); 4 Aug 2011 08:00:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 39461 invoked by uid 500); 4 Aug 2011 08:00:35 -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 39445 invoked by uid 99); 4 Aug 2011 08:00:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 08:00:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shekher.awasthi@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; Thu, 04 Aug 2011 08:00:26 +0000 Received: by eyb7 with SMTP id 7so918563eyb.32 for ; Thu, 04 Aug 2011 01:00:05 -0700 (PDT) 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=zDf+0fUAXRvfhbdMJ3CEBAy2bT23e38Rb6jb0KXoeUY=; b=ebQJGKGw+BjeXM8B5rAzH2jkTBtDbCSvMMOHutfzi3WBviIUscmal2v9UTHmFWUP/Z wJl9HBBuMVWkp6CoNL2j+e7eDJcWEAN4d1MgJp+nsPcIV7gJKBxXKCrbz70Ra2scenRc WvnyGRnHfo2Zgsls3Ew1QhkuqiuPvW7gMlXV0= MIME-Version: 1.0 Received: by 10.14.37.78 with SMTP id x54mr125999eea.50.1312444805162; Thu, 04 Aug 2011 01:00:05 -0700 (PDT) Received: by 10.14.96.15 with HTTP; Thu, 4 Aug 2011 01:00:05 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Aug 2011 13:30:05 +0530 Message-ID: Subject: Re: Custom URIResolver for Camel From: shekher awasthi To: users@camel.apache.org Content-Type: multipart/alternative; boundary=90e6ba6153aa66269504a9a95e7c --90e6ba6153aa66269504a9a95e7c Content-Type: text/plain; charset=ISO-8859-1 thanks Claus for the reply i tried even like this and even for the first part its giving me the foloowing exception org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route tutu at: >>> To[xslt:file://target/inventory/updates/xlsconvertor?fileName=filXMLConverter.xsl] <<< in route: Route[[From[file://target/inve ntory/updates?noop=true]] -> [... because of Failed to resolve endpoint: xslt://file://target/inventory/updates/xlsconvertor?fileName=filXMLConverter.xsl due to: target URL [file://target/inventory/updates/xlsconvertor] i am still clueless what i am doing wrong On Thu, Aug 4, 2011 at 1:19 PM, Claus Ibsen wrote: > On Thu, Aug 4, 2011 at 9:40 AM, shekher awasthi > wrote: > > we are trying to use xsl for converting xml to our custom xml format > using > > camel and its out of the box xslt support here is a sample route > > > > > > > > > > > > > > uri="xslt:file//target/inventory/updates/xlsconvertor/XMLConverter.xsl"/> > > > > > > > > my problem is when i am putting this xls file in the class path camel is > > happily picking the xls and doing the work as per the route but moment we > > are placing the xls file out of class path like in a file system camel is > > unable to resolve this and we are struck as the whole purpose to use xls > is > > to take custom xml formatting out of the jar > > > > By default the xslt looks in the classpath. If you want to read from > the file system, you need to prefix with file:// > Notice the colon. > > Its documented here: > http://camel.apache.org/xslt > > > > as a workaround i tried to create a customURLResolver and than tried to > use > > it as > > > > > > > > > > > > > > uri="xslt:file//target/inventory/updates/xlsconvertor/XMLConverter.xsl?uriResolver=customURIResolver"/> > > > > > > > > but in this case camel is not calling my customURIResolver any idea how i > > can make camel to use my custom URIResolver in place of its default > resolver > > > > > > > > thanks in advance > > > > Shekher > > > > > > -- > 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/ > --90e6ba6153aa66269504a9a95e7c--