Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Data Source setup one to multiple values

jesantos
jesantos Posts: 12

I have a response that needs to reply back with multiple chunks of xml tags according to the # of party Ids that match the accountNumber provided in the incoming request. So my dataset looks like below:

accountNumber,partyId
1,111
1,222
1,333
2,444
2,555
3,666
3,777
3,888

Using Data Source correlation I can make the correlation happen successfully, however when using the partyId variable at the response side it is only getting the first element found, for example, if the incoming request is having accountNumber 1, partyId is only populating "111" in the response, how can I get the full # of partyIds like in an array and use them in response?

Comments

  • williammccusker
    williammccusker Posts: 672 ✭✭✭

    Hi,

    Data Source correlation is a one to one mapping that matches an incoming request to one specific rows in a data source. You may want to use a Data Repository and a Parameterized response that can fill in arrays and hierarchical data.

    Here is some documentation I found on creating such a responder from traffic
    https://docs.parasoft.com/display/SOAVIRT9103/Creating+Parameterized+Message+Responders+from+Traffic

    If you don't have traffic you can put in response, with an example that has an array, then in Form Input there should be a right click option to parameterize using data repository.

    Hope this helps!