Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 68358 invoked from network); 7 May 2009 12:14:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 May 2009 12:14:42 -0000 Received: (qmail 48428 invoked by uid 500); 7 May 2009 12:14:41 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 48396 invoked by uid 500); 7 May 2009 12:14:41 -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 48386 invoked by uid 99); 7 May 2009 12:14:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2009 12:14:41 +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 claus.ibsen@gmail.com designates 209.85.220.177 as permitted sender) Received: from [209.85.220.177] (HELO mail-fx0-f177.google.com) (209.85.220.177) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2009 12:14:30 +0000 Received: by fxm25 with SMTP id 25so753978fxm.20 for ; Thu, 07 May 2009 05:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=khLmDFY2fVKbG03ajBxgPspyr3gXsU5EGazMhnfmCyo=; b=CIg9icgJtvESxAD8uaZeEePJYLt8I1j71uxaAMCEvlpRvglyxEK6yVzSEGdywIk1Zp xFIwJua65obU/QxT0qyVcG2XR0kJc93JOJDfFk4zrq9j2CjzLWebYmmP+pIHnwy6AACk jywRv+3bi1v6aQgbwLbDiDZb5ZhqoIs10Jplw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=rjvE7G9SOdz9xpCTEVQj8laNq7wn8RLyI+kGOv8cx/i6e04ZU7NfnFZWbNpWwrkShg rweqtv+BEdEparSijRVxVwww7m6ayNRNJ6YY16bE8mBKE7t8KEYYFmRNrAuhuFVaqV0r xpRFDOH02Nrdcbcq2kG8u8UnvXSwimL72139w= MIME-Version: 1.0 Received: by 10.204.98.141 with SMTP id q13mr2069228bkn.188.1241698449191; Thu, 07 May 2009 05:14:09 -0700 (PDT) In-Reply-To: <23425375.post@talk.nabble.com> References: <23422445.post@talk.nabble.com> <5380c69c0905070223n4c62db57sce90979c1abea6e3@mail.gmail.com> <23423271.post@talk.nabble.com> <5380c69c0905070300s62035ecpb02f05bbb951c23@mail.gmail.com> <23425375.post@talk.nabble.com> From: Claus Ibsen Date: Thu, 7 May 2009 14:13:49 +0200 Message-ID: <5380c69c0905070513i6b6968b4sd5957031ebdb7c84@mail.gmail.com> Subject: Re: Can I use a message translator with an xpath expression? To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Thu, May 7, 2009 at 2:04 PM, LavanyaKC wrote: > > Thanks Claus. > > It worked fine with convertBodyTo. It applies the xpath and the output is > coming in the out folder. > I did something wrong with the destination file endpoint settings earlier= . Glad it worked for you as the XML and Xpath can be tricky once in a while. > > Lavanya. > > > Claus Ibsen-2 wrote: >> >> Hi >> >> What do you expect as output from the xpath expression? >> Its a NodeList if for instance the xml contains multiple students. >> >> Can you post an example? What you send IN and what your expect as OUT ? >> >> >> On Thu, May 7, 2009 at 11:37 AM, LavanyaKC wrote: >>> >>> Thanks Claus. >>> >>> I tried with >>> >>> >>> which still did not solve the problem. >>> >>> Lavanya. >>> >>> >>> Claus Ibsen-2 wrote: >>>> >>>> Hi >>>> >>>> Yeah xpath can be a pain in the .... >>>> There is an option you can set on the xpath to force it to use a >>>> certain result type. I think its resultType=3D"java.lang.String". >>>> That might help a bit. >>>> >>>> As transform evalulates any expression it ought to be possible to set >>>> the result of the xpath evaluation. >>>> >>>> Otherwise you can try the enable the tracer to see the message as its >>>> routed >>>> http://camel.apache.org/tracer.html >>>> >>>> On Thu, May 7, 2009 at 10:35 AM, LavanyaKC wrote= : >>>>> >>>>> Hi >>>>> >>>>> I am not getting any output running the following xml file, >>>>> >>>>> >>>> id=3D"null_1"> >>>>> =A0 =A0 >>>>> =A0 =A0 >>>>> =A0 =A0 =A0 =A0/Students/Student >>>>> =A0 =A0 >>>>> =A0 =A0 >>>>> =A0 =A0 >>>>> =A0 =A0 >>>>> >>>>> >>>>> It works fine with other expressions like simple. Can we use xpath to >>>>> translate a message? >>>>> >>>>> Thanks, >>>>> Lavanya. >>>>> -- >>>>> View this message in context: >>>>> http://www.nabble.com/Can-I-use-a-message-translator-with-an-xpath-ex= pression--tp23422445p23422445.html >>>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Claus Ibsen >>>> Apache Camel Committer >>>> >>>> Open Source Integration: http://fusesource.com >>>> Blog: http://davsclaus.blogspot.com/ >>>> Twitter: http://twitter.com/davsclaus >>>> Apache Camel Reference Card: >>>> http://refcardz.dzone.com/refcardz/enterprise-integration >>>> Interview with me: >>>> http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=3D= 7893-progress >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Can-I-use-a-message-translator-with-an-xpath-expr= ession--tp23422445p23423271.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Open Source Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> Apache Camel Reference Card: >> http://refcardz.dzone.com/refcardz/enterprise-integration >> Interview with me: >> http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=3D78= 93-progress >> >> > > -- > View this message in context: http://www.nabble.com/Can-I-use-a-message-t= ranslator-with-an-xpath-expression--tp23422445p23425375.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > --=20 Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus Apache Camel Reference Card: http://refcardz.dzone.com/refcardz/enterprise-integration Interview with me: http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=3D7893-= progress