Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 82933 invoked from network); 25 Nov 2010 18:03:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 Nov 2010 18:03:59 -0000 Received: (qmail 40756 invoked by uid 500); 25 Nov 2010 18:03:59 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 40508 invoked by uid 500); 25 Nov 2010 18:03:58 -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 40500 invoked by uid 99); 25 Nov 2010 18:03:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Nov 2010 18:03:58 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [129.183.4.8] (HELO ecfrec.frec.bull.fr) (129.183.4.8) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Nov 2010 18:03:52 +0000 Received: from cyclope.frec.bull.fr (cyclope.frec.bull.fr [129.183.4.9]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id D719D6F599 for ; Thu, 25 Nov 2010 19:01:52 +0100 (CET) Received: from [127.0.0.1] (pa-129.183.149.243.frec.bull.fr [129.183.149.243]) by cyclope.frec.bull.fr (Postfix) with ESMTP id E2BA02728D; Thu, 25 Nov 2010 19:01:51 +0100 (CET) Message-ID: <4CEEA4F2.9040402@bull.net> Date: Thu, 25 Nov 2010 19:03:30 +0100 From: "S. Ali Tokmen" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: users@camel.apache.org Cc: Missonnier Guillaume Subject: Re: Loop in a CAMEL route References: <4CEEA389.3070805@bull.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello Claus I had thought about the dynamic router EIP; but still check since I thought there was an Expression or something like that in a loop (like "should I still go ahead?"). Thank you S. Ali Tokmen savas-ali.tokmen@bull.net Office: +33 4 76 29 76 19 GSM: +33 66 43 00 555 Bull, Architect of an Open World TM http://www.bull.com On 25/11/2010 18:59, Claus Ibsen wrote: > The Loop DSL uses a predicate so you can compute this. > > You can also use the dynamic router EIP and just circle back to the > web service until you are done. > > Or from a POJO where you can do the loop logic in Java code. > > > > On Thu, Nov 25, 2010 at 6:57 PM, S. Ali Tokmen > wrote: >> Hello >> >> I am currently interacting with a webservice from which I request lists of >> documents. The issue is that the web service can only return documents 100 >> by 100; therefore I need to loop and I do not know how much documents I have >> total. Basically, it looks like: >> >> var List allDocuments >> var Pointer lastDocument = beginning >> while web service still has documents >> var List documents = get documents starting from lastDocument >> lastDocument = documents.lastDocument >> allDocuments.add documents >> >> >> I've taken a look at http://camel.apache.org/loop.html but that one requires >> me to know the total number of loops; which I do not. >> >> Any solutions? >> >> Cheers >> >> -- >> >> S. Ali Tokmen >> savas-ali.tokmen@bull.net >> >> Office: +33 4 76 29 76 19 >> GSM: +33 66 43 00 555 >> >> Bull, Architect of an Open World TM >> http://www.bull.com >> >> > >