Page 1 of 1

Web Service Client - All data on one row

Posted: Tue Oct 28, 2014 11:44 am
by BradMiller
I am creating a parallel job that calls a web service. The service developer provided me the WSDL which I successfully imported into DataStage using the Web Service Meta Data Importer. I then created my job, using the Web Services Client stage as my input. I was able to select the web service operation and load the Input and Output Arguments and message information.

When I run the job, instead of gettng the expected 100 rows, I get one row. All values for each column are concatenated together.

For example:

Code: Select all

Customer Number                    MonthYear
100200300...                       201410201410201410201410...
Expected:

Code: Select all

Customer Number       MonthYear
100                   201410
200                   201410
300                   201410
Any ideas of how I can correctly parse the data? It is coming in in XML format which appears to me to be formatted correctly. The columns tab correctly displays the XML mapping.

Posted: Wed Oct 29, 2014 6:27 pm
by eostic
The Web Service client isn't set up to handle an array of data in the response payload......

...so create a single output column.....call it something like "xmlResponse" and give it a longvarchar and some really long length. In the "message" tab, find the check box and pull down for "user defined column". Also, to be safe, put a single "slash" in the Description property of that single column on the link.

Send it to a sequential Stage. Use "none" for quote character and none for delimiter. Write it somewhere. Check to see that it is your valid payload.

Use this to learn the xmlInput Stage. Build a Job that reads the xml document with the xmlInput Stage....use the "repeating element" to define the repeating node that delivers all your rows. Get that working perfectly and then combine the concepts. You ultimately will feed that single column from the WS Client into the xmlInput Stage, and get all of your rows.

Ernie

Posted: Mon Nov 03, 2014 10:09 am
by BradMiller
Thanks Ernie. This is how we are proceeding. I appreciate the information.