Loop in SOAP request created in js activity

Avatar

Avatar

adithyacs86

Avatar

adithyacs86

adithyacs86

22-02-2018

Hi Team,

we have got a new requirement basically there are three major columns A,B and C; now for each major column/ field is 24 fields like A1 to A24 , B1 to B24 and C1 to C24 respectively from the input we are getting.

And the data we are requested to send to third party system is in the combination of A1+B1+C1 and so on.. If there is no data for the combination we will not be sending that data (A1+B1+C1 >0) only will have to sent.

We have got the soap xml file where we need to send this combination  , we thought of creating 24 combinations manually in the js activity :-

'<retrieveAllDataResponse>'+

'<Data1>A1</Data1>'+

               '<Data2>B1</Data2>'+

               '<Data3>constant</Data3>'+

               '<condition1>'+

                  '<Data4>constant</Data4>'+

                  '<Data5>C1</Data5>'+

                  '<Data6>constant</Data6>'+

                  '<sign>+</sign>'+

               '</condition1>'+

            '</retrieveAllDataResponse>'+

            '<retrieveAllDataResponse2>'+

'<Data1>A2</Data1>'+

               '<Data2>B2</Data2>'+

               '<Data3>constant</Data3>'+

               '<condition1>'+

                  '<Data4>constant</Data4>'+

                  '<Data5>C2</Data5>'+

                  '<Data6>Constant</Data6>'+

                  '<sign>+</sign>'+

'</condition1>'+

'</retrieveAllDataResponse2>'+

.

.

.

till <retrieveAllDataResponse24>

</retrieveAllDataResponse24>

Since this request will also include the null values if any and will occupy all 24 placeholders, so can we have any looping for this combination so i can send the combinations of which is having data in any attribute (non zero values).

Thanks,

Adithya

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

adithyacs86

Avatar

adithyacs86

adithyacs86

15-03-2018

Hi Florentlb,

Not yet still working on the logic to apply the looping condition inside the SOAP xml.

Thank you,
Adithya

Avatar

Avatar

florentlb

Avatar

florentlb

florentlb

13-03-2018

Hi Adithya,

I do not have the necessary knowledge to answer your question. Were you able to find an answer or a workaround?

Florent