2 Replies Latest reply on Feb 3, 2012 4:06 PM by Timothy Stewart

    Loop in a CAMEL route

    Mrudul Palvankar Novice

      Based on the request, I need to invoke external web service multiple times. 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 have or which I need to calculate based on the elements in the request.

       

      For example:

       

      My request is ab below and based on the report elements, I need to invoke external service.

       

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

            

           <soapenv:Body>

                <tns:getReportsRequest

                xmlns:tns="http://ubs.com/wma/wmf/service/report/v1.0">

                     <tns:reports>

                          <tns:report>

                               <tns:reportID>123</tns:reportID>

                               <tns:reportRequest></tns:reportRequest>

                          </tns:report>

                          <tns:report>

                               <tns:reportID>786</tns:reportID>

                               <tns:reportRequest></tns:reportRequest>

                          </tns:report>

                     </tns:reports>

                </tns:getReportsRequest>

           </soapenv:Body>

      </soapenv:Envelope>

       

      Any solution please?