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 9823210322 for ; Mon, 6 May 2013 12:29:06 +0000 (UTC) Received: (qmail 49101 invoked by uid 500); 6 May 2013 12:29:06 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 48517 invoked by uid 500); 6 May 2013 12:29:02 -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 48470 invoked by uid 99); 6 May 2013 12:29:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 May 2013 12:29:00 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: encountered temporary error during SPF processing of domain of nikagra@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 May 2013 12:28:55 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UZKWc-0005JY-2x for users@camel.apache.org; Mon, 06 May 2013 05:28:14 -0700 Date: Mon, 6 May 2013 05:28:14 -0700 (PDT) From: nikagra To: users@camel.apache.org Message-ID: <1367843294033-5732079.post@n5.nabble.com> Subject: Question about Camel end() and endChoice() expressions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello I have question about end() and endChoice() expressions. Here is how my route looks like: Some XML-->split-->continue processing XML structure is like: V. Lenin
Soviet Russia, Moscow, Kremlin
Here is part of my route: .split(xpath("/person/*")) .convertBodyTo(String.class) .choice() .when(xpath("/address")) .setBody(xpath("/person/adderss/text()")) .to("direct:processAddress") .when(xpath("/name")) .setBody(xpath("/person/name/text()")) .to("direct:process") .end() // (*) .end() During XML processing I want to process parts of XML (i.e. write them to file) and then process initial XML as a whole. I've found that depending of what I put to line marked with asterisk message will contain either one of splitted parts (name or address if endChoice() is put in this line) or whole message (in case of end()). I failed to find some exhaustive documentation on when I should use end() or endChoice() expressions Could you please explain such behavior? -- View this message in context: http://camel.465427.n5.nabble.com/Question-about-Camel-end-and-endChoice-expressions-tp5732079.html Sent from the Camel - Users mailing list archive at Nabble.com.