• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Collecting data to array before calling a webservice

#1 2010-05-19 16:39:53

Neo83
New member
Registered: 2010-05-19
Posts: 2

Collecting data to array before calling a webservice

Tags: [webservice]

Hi, I'm a novice.

Can I collect data from the row flow into an array of object before calling a webservice? I would call the webservice only one time.
below I show my job...


Thanks


Uploaded Images

Offline

#2 2010-05-20 10:00:09

shong
Talend team
Registered: 2007-08-29
Posts: 10357
Website

Re: Collecting data to array before calling a webservice

Hello

Can I collect data from the row flow into an array of object before calling a webservice?

Yes, you can define a array or list and store each row to the array or list on tJavaFlex component. For example:
tFileInputDelimited---row1-->tJavaFlex
     |
onsubjobok
     |
tWebserviceInput---tLogRow

on start code, define a list or array,
java.util.List<String> list=new java.util.ArrayList<String>();
on main code, store each to list or array,
list.add(row1.name);
on end code, put the list or array to global var,
  globalMap.put("list",list);

when using the list or array, you get the value by :
java.util.List list=(java.util.List)globalMap.get("list");


Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2010-05-20 10:07:18

Neo83
New member
Registered: 2010-05-19
Posts: 2

Re: Collecting data to array before calling a webservice

Thank you very much...shong....

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Collecting data to array before calling a webservice

Board footer

Powered by FluxBB