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 1D05C7D7B for ; Fri, 2 Sep 2011 21:20:06 +0000 (UTC) Received: (qmail 81199 invoked by uid 500); 2 Sep 2011 21:20:05 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 81076 invoked by uid 500); 2 Sep 2011 21:20:04 -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 81068 invoked by uid 99); 2 Sep 2011 21:20:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 21:20:04 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=NORMAL_HTTP_TO_IP,SPF_NEUTRAL,URI_HEX,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Sep 2011 21:19:59 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Qzb9G-0002b5-5A for users@camel.apache.org; Fri, 02 Sep 2011 14:19:38 -0700 Date: Fri, 2 Sep 2011 14:19:38 -0700 (PDT) From: boday To: users@camel.apache.org Message-ID: <1314998378152-4763955.post@n5.nabble.com> In-Reply-To: <1314958433624-4761827.post@n5.nabble.com> References: <1314958433624-4761827.post@n5.nabble.com> Subject: Re: Set response by a second route through "direct" routing? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Martin, this should work...just make sure you are setting the OUT message on the exchange (exchange.getOut().setBody("RESPONSE"), etc)... heinrichheine wrote: > > Hi, > to make my route nicer i created a splitter in my incoming http route. > Depending of the content i route the request to different routes via > direct. > The thing is, that i have to create the response for the http-request in > my first route. But i want to create a response from within my directed > routes. Is this possible? > > Example > > from("jetty://http://127.0.0.1:1234/") > .choice() > .when().xpath(expression1) > .to("direct:goodRoute") > .when().xpath("expression2) > .to("direct:badRoute"); > > So, i want to create the response for the http request in goodRoute and > badRoute. But in real life, the response is just empty if i do so. Do i > have to add an option to the direct route? > > Thanks > martin > ----- Ben O'Day IT Consultant -http://consulting-notes.com -- View this message in context: http://camel.465427.n5.nabble.com/Set-response-by-a-second-route-through-direct-routing-tp4761827p4763955.html Sent from the Camel - Users mailing list archive at Nabble.com.