Page 1 of 1

XML Output

Posted: Wed May 08, 2013 2:35 pm
by Nagaraj
WS is outputting 5 rows with suppose 10 columns
The output i get is just one row with each column getting values from 5 rows and this happens for each column.
so column data is getting appended.

Job design


WS_Client---->Copy---->TFM--->WS_TFM--->TFM--->DataSet


Here Client which accepts login ID and it uses this iD and in the first transformer i mention the time period
i get the time sheet data in the final dataset.

How do i get the data into tabular format into the file so that i add this to Database table?

Posted: Wed May 08, 2013 2:46 pm
by Nagaraj
Sample output data

Col1 Col2
1 2 3 2012-09-122012-02-042012-06-05

Posted: Wed May 08, 2013 3:49 pm
by eostic
might depend on what the service is sending back.

Have you fully tested it in a tool like SOAPui? That's a good idea so that you can get very familiar with the payload that the service returns.

Another good thing to do is to copy your job, then put one column on the output link from the WSClient....delete all the others.....send the link to a sequential stage with NONE/NONE for delimieter and quote character....in that single column, which should be a varchar and a long length, put a single "/" in the Description.

Alternatively, you should be also able to go to the "message" tab and pick your single large column in the pull down that says "user defined message".

Now look at the resulting data in the sequential file. is it xml? is it something else? These days you might get XML in SOAP, or REST, or you might even get a chunk of JSON. Mostly likely it is soap, and has an array in it....if so, you "may" need to ultimately pass that soap envelope to an xmlInput Stage and parse out the data and rows you are looking for.

Let's first find out what it is sending you.

Ernie

Posted: Thu May 09, 2013 12:36 pm
by Nagaraj
Thank you, I output the whole chunk to a sequential file and reprocessed it using XML input stage and parsed the data. But looks like the soap response i see in the UI tool has data which can go to multiple tables. how to read this and load it to three different tables?

Posted: Thu May 09, 2013 8:57 pm
by eostic
....each repeating "node" of the xml document gets its own output link.....leading to a different relational table.

Work with your output file and get that to work, and then you can tie them together in the same Job.

Ernie