Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 715CE1536 for ; Sun, 24 Apr 2011 16:00:46 +0000 (UTC) Received: (qmail 15851 invoked by uid 500); 24 Apr 2011 16:00:46 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 15829 invoked by uid 500); 24 Apr 2011 16:00:46 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 15821 invoked by uid 99); 24 Apr 2011 16:00:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Apr 2011 16:00:46 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Apr 2011 16:00:44 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C32A3B0F15 for ; Sun, 24 Apr 2011 16:00:05 +0000 (UTC) Date: Sun, 24 Apr 2011 16:00:05 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: dev@camel.apache.org Message-ID: <1886307839.78998.1303660805796.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-3531) scala - xpath not working together with choice/when MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CAMEL-3531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13024644#comment-13024644 ] Claus Ibsen commented on CAMEL-3531: ------------------------------------ Yeah I have reproduced the issue as well. The problem is that the xpath is evaluated as an expression and not as a predicate in the filter EIP in Scala DSL. > scala - xpath not working together with choice/when > --------------------------------------------------- > > Key: CAMEL-3531 > URL: https://issues.apache.org/jira/browse/CAMEL-3531 > Project: Camel > Issue Type: Bug > Components: camel-scala > Affects Versions: 2.5.0 > Environment: Ubuntu Linux 10.04, java 1.6 > Reporter: Craig McDaniel > Fix For: Future > > Attachments: XPathContentBasedRouterTest.scala > > > When using the Scala DSL, xpath expressions inside when() do not work as expected. As an example: > {code:none} > "direct:a" ==> { > choice { > when (xpath("//hello")) to ("mock:english") > when (xpath("//hallo")) { > to ("mock:dutch") > to ("mock:german") > } > otherwise to ("mock:french") > } > } > // Send messages > "direct:a" ! ("", "", "") > {code} > Here we should receive 1 message in each of the mocks. For whatever reason, all 3 messages go to mock:english. Similar routes work as expected with the Java DSL. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira