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 A601D9A10 for ; Thu, 8 Mar 2012 07:21:15 +0000 (UTC) Received: (qmail 22001 invoked by uid 500); 8 Mar 2012 07:09:48 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 21620 invoked by uid 500); 8 Mar 2012 07:09:31 -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 21427 invoked by uid 99); 8 Mar 2012 07:09:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 07:09:24 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.215.45 as permitted sender) Received: from [209.85.215.45] (HELO mail-lpp01m010-f45.google.com) (209.85.215.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 07:09:19 +0000 Received: by lahe6 with SMTP id e6so221754lah.32 for ; Wed, 07 Mar 2012 23:08:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=RmLXBwnAUw4Iw13jdHevlc+wjevVNAlbJFZ0eCelrHk=; b=WZCPHxivx8SK7gKgiHKQVEm7V6+5pZXGsAoC5h5fDIgGDbljR4NqK1a4NjFmk9QsmW L5f/7Duko7trWr9XIToEDQ2LQKPZ/3W0wjGg64ueWGg+VMvkK5GCPDWjnCWo74GB15Ez vh611dXFU/An3W6SBxvYXi2yIOwwUFgF0y4JUbgBl6t1JBNRkIbinLiOEr1zax+9rv+t D0/X5wnHPi84DNiakCyBhRv09OdlDMionjn/RIoafJLUEbCsgVFvflaU9yfT0EhNAWSQ foM8S6hBdH6mcbwlI8S2XdlxBMLFJfsv5SnXNAhBjUjVwNsfrTWtqvUe6AahVitSXsGu vLow== Received: by 10.112.11.9 with SMTP id m9mr1712982lbb.60.1331190538283; Wed, 07 Mar 2012 23:08:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.107.106 with HTTP; Wed, 7 Mar 2012 23:08:38 -0800 (PST) In-Reply-To: <1331148103549-5545275.post@n5.nabble.com> References: <1331148103549-5545275.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 8 Mar 2012 08:08:38 +0100 Message-ID: Subject: Re: how to specify which method when calling a direct route? 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 Hi What version of Camel are you using? And what does your direct route look like? Setting a header with the key "CamelBeanMethodName" ought to take precedence on the name of the method to invoke. eg the key name is from a constant on Exchange.BEAN_METHOD_NAME You can enable and use the tracer to see what the message contains when being routed, to see the header is present when it hit the bean http://camel.apache.org/tracer On Wed, Mar 7, 2012 at 8:21 PM, codemonkey73 wrote: > We've built a small directory of services (POJOs) for which we have built > direct to bean routes. =A0They've worked so far when using a ProducerTemp= late > to call the direct route. =A0To specify the method when using > ProducerTemplate, we use requestBodyAndHeader("direct:myService", > [methodparameterOrNull], "CamelBeanMethodName", "myServiceMethodSignature= "). > > Now I'm trying to call these services from an established web project whi= ch > doesn't use spring or camel. I'm trying to minimize the changes to that > project and keep spring and camel out, so I thought I would try to set up= a > servlet route in the Camel project, and then route that servlet call to t= he > services directory via a direct route. =A0The simple servlet routing is > working, but what I can't figure out is the routing from the servlet to t= he > existing direct routes of the services. > > I've tried variations of the following: > > from("servlet:///servletRouteMapping"). > setHeader("CamelBeanMethodName", constant("myServiceMethodSignature")). > to("direct:myService"); > > The response my client gets is 'Not Implemented Yet'. > > I was planning on using different servlet mappings and routes for each of > the methods of the service. > > -- > View this message in context: http://camel.465427.n5.nabble.com/how-to-sp= ecify-which-method-when-calling-a-direct-route-tp5545275p5545275.html > Sent from the Camel - Users mailing list archive at Nabble.com. --=20 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/