Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7731505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:29:48+00:00 2026-06-01T06:29:48+00:00

I am building a BPEL process in Netbeans 6.8 and I invoke a Web

  • 0

I am building a BPEL process in Netbeans 6.8 and I invoke a Web Service that returns a list of ints.

<xs:complexType name="getHotelsResponse">
<xs:sequence>
<xs:element name="return" type="xs:int" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:complexType>

I want (if possible – not sure anymore…) to iterate through all those ints and invoke a different Web Service for each one of them.

I tried using a ForEach activity, but I can’t figure out the usage for my case.
It requires a Start Value and an End Value (if I could somehow get how many ints I got back) but even then inside the ForEach activity if say I put an Assign activity how do I get the current element of the list in each loop?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:29:49+00:00Added an answer on June 1, 2026 at 6:29 am

    I used following BPEL snippet to concat the content of a list in to a comma separated string.
    You can use the same code with an invoke to call external service.

    <bpel:forEach parallel="no" counterName="Counter" name="ForEach">
            <bpel:startCounterValue>
                <![CDATA[1]]>
            </bpel:startCounterValue>
            <bpel:finalCounterValue><![CDATA[count($input.payload/tns:return)]]></bpel:finalCounterValue>
            <bpel:scope>
                <bpel:assign validate="no" name="AppendItem">
                    <bpel:copy>
                        <bpel:from>
    
                            <![CDATA[concat($Response, $input.payload/tns:return[round($Counter)], ", ")]]>
                        </bpel:from>
                        <bpel:to variable="Response"></bpel:to>
                    </bpel:copy>
                </bpel:assign>
            </bpel:scope>
        </bpel:forEach>
    

    You can get the count of elements from the following XPath

    count($input.payload/tns:return)
    

    You can access value of the i th element using the following XPath

    $input.payload/tns:return[round($Counter)]
    

    You may get rid of the round() function, but I had to use to get rid of an issue in Apache ODE.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a BPEL process that takes an itinerary as input: this is
Building a new ASP.net application, and planning to separate DB, 'service' tier and Web/UI
Building a test web service and all was working great, so I added the
Building a quick view that will display a list of all days but only
Building a new Mobile Web Platform for Mobile Users to purchase & download content
building a site using PHP and MySQL that needs to store a lot of
Building a website that has English & Japanese speaking users, with the Japanese users
Building an iPhone OS application that will allow users to anonymously post information to
Building a commercial product may use various open source libraries that have use of
Building my first WP theme and I quickly realized that I need to remove

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.