Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to get multiple rows from webservice?

Hi!
I call a webservice that can return multiple objects.
How do I make tWebserviceInput component to output several rows?
I use tWebserviceInput in advanced mode. Standard example is to do this :
for(int i = 0; i < result.length; i++){
output_row.name = result ;
output_row.address = result;
}
But, obviously, this will result in one one row being output.
This si what happens.
So is there a way to output several rows?
Thanks,
Marina
Labels (2)
2 Replies
Anonymous
Not applicable
Author

I answer myself in case somebody wans to know if there is a solution.
I could not get it done with iWebserviceInput. I ended up creating tJavaFlex that calls webservice code and then iterates through the lines of the result. This component has output links "Main" and "Interate" so I can use a resulting lines normally
_AnonymousUser
Specialist III
Specialist III

To get the tWebserviceInput component to output multiple rows you need to use the Match Brackets drop down on the advanced settings of the tWebserviceInput component see post:
https://community.talend.com/t5/Design-and-Development/Finding-missing-values-in-a-sequence/td-p/672...
In your example you would put
for(int i = 0; i < result.length; i++){
output_row.name = result ;
output_row.address = result;

missing out the final bracket
you then set the Match Brackets drop down to }
This works for me.