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 3208810267 for ; Wed, 10 Jul 2013 14:48:35 +0000 (UTC) Received: (qmail 1777 invoked by uid 500); 10 Jul 2013 14:48:34 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 1333 invoked by uid 500); 10 Jul 2013 14:48:34 -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 1287 invoked by uid 99); 10 Jul 2013 14:48:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 14:48:32 +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 cristiano.costantini@gmail.com designates 209.85.223.176 as permitted sender) Received: from [209.85.223.176] (HELO mail-ie0-f176.google.com) (209.85.223.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 14:48:26 +0000 Received: by mail-ie0-f176.google.com with SMTP id ar20so15379860iec.21 for ; Wed, 10 Jul 2013 07:48:05 -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=4NVMZpIwHg1LRhY8k+DoQYgp6U4nvETvlLcfsMgPDlg=; b=FflMGGzgvBbQAjbcNDRD/prUIjarlRhmmqSPzV5NDxSu4+wQP1Atl/j/szO66IUawt lwkmx/T98O/Bhp9Ncmf/6HL+AMF7uvwd1UB/q0WZRKG6R7+HepMZTm1LOg485HmkzDzv QpARp/sP7dJ191rwYRmKeRZs5I3IUvnU43q5qbzVX1XtaSw4whSIWP+LQEnMHfyV5v67 1FD9ViyGAsgxBnmI5QNCJd8HlSMtZt1VvOSaAyepK5GeOILgsH3KNmX1WQHPhUV1E1mE Nv/UMTsWQXLLm+taJBesOPq+cgLc7FMaX0dwbyiqXQMOWDlbqrRv9Es3JXjMCafIBZTN KNBg== MIME-Version: 1.0 X-Received: by 10.50.80.9 with SMTP id n9mr12004375igx.42.1373467685034; Wed, 10 Jul 2013 07:48:05 -0700 (PDT) Received: by 10.50.114.101 with HTTP; Wed, 10 Jul 2013 07:48:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Jul 2013 16:48:04 +0200 Message-ID: Subject: Re: Extract the name of the Method from a Bean invokation. From: Cristiano Costantini To: users@camel.apache.org Content-Type: multipart/alternative; boundary=089e013a2d867a235204e1295dda X-Virus-Checked: Checked by ClamAV on apache.org --089e013a2d867a235204e1295dda Content-Type: text/plain; charset=ISO-8859-1 mmm, it seems that "${body.method.name}" works: ${body.method.name} Any comment about this solution? (is it good?) What happens if the body is not of class org.apache.camel.component.bean.BeanInvocation? Is there a way to check if body is of the right instance? Many thanks!!! Cristiano 2013/7/10 Cristiano Costantini > Hi All, > > I have a Camel Proxy that pushes "BeanInvokation" exchanges to a camel > route, and I want to route these messages depending on the method name that > is invoked. > > Is there any way to extract this information and put into an header so to > use it in a ? > > > For example, considering the following XML code: > > > serviceUrl="direct:entry" /> > > > > > > > > > > ${header.methodName} == 'myMethod1' > > > > ${header.methodName} == 'myMethod2' > > > > > > > > > > > I'm searching for a solution to be used between the two tags. > > I know I can write a processor, but I will have problems deploying it to > the classpath where I put the route, so I need a solution that rely on the > default camel capability (like using simple language or other expression > languages available with camel). > > > Any idea? > Thank you all! > > Cristiano > > > --089e013a2d867a235204e1295dda--