set parameter as array for webservice

Dedicated to DataStage and DataStage TX editions featuring IBM<sup>®</sup> Service-Oriented Architectures.

Moderators: chulett, rschirm

getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

set parameter as array for webservice

Post by getsatish_gk »

Hi all,

I have exposed DS v8.7 job as web services, and the web service to send data xml array (wsdl)
I have created parameters in the job and job is deployed as a service (all necessary things are done to deploy job as service)

now, how do i reflect the wsdl with data array structure? any setting at the IBM server console or web console?

I am able to get the data from other web service using ISD Output stage, but still wondering if this is the correct stage to use to accept input from other web service. (what about ISD Output and Web service client stages??)
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

There is a check box in the ISD Console...at the Operation level.....at the bottom where you see the input and output tabs...you'll see check boxes to group into structure and to return an array. Be sure that is checked....the WSDL will reflect it properly.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

I have checked the boxes to group into structure and to return an array.

wondering, if anything to do at the job level? Since, all the input column will be listed in the job parameter and do I need to have xml input stage to accept the data?
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Are you talking about the WSDL for the service or the Job that "is" your service, or are you talking about how to CALL that service from within ANOTHER DataStage Job?

For the Job that "is" the service you don't have to do anything. One will assume that if you are choosing array for the output, then you expect one or more rows to be returned (typical if the source is a file or rdbms Stage, or if you have a multi-row return lookup in the Job).

Test it via SOAPui and you'll see. You'll get all your rows.

If you are trying to "call" this array based web service from within another DataStage Job, then yes, you'll need to capture the whole output payload and then use an XML Stage downstream to parse it out into its individual rows. One might ask then "why use a Web Service" if DataStage is the only consumer.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Are you talking about the WSDL for the service or the Job that "is" your service, or are you talking about how to CALL that service from within ANOTHER DataStage Job?

For the Job that "is" the service you don't have to do anything. One will assume that if you are choosing array for the output, then you expect one or more rows to be returned (typical if the source is a file or rdbms Stage, or if you have a multi-row return lookup in the Job).

Test it via SOAPui and you'll see. You'll get all your rows.

If you are trying to "call" this array based web service from within another DataStage Job, then yes, you'll need to capture the whole output payload and then use an XML Stage downstream to parse it out into its individual rows. One might ask then "why use a Web Service" if DataStage is the only consumer.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

My job is the enabled for web service
ie., web service-----> my DataStage job-----> Response back to web service
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

Hi all,

job is able to successfully accept one row of data from web service and run through the job. but, I am still wondering to make job to accept the array of input data from web service.

when i add ISD Input stage followed by XML input stage, I can see the array while deploying the job from server console, but the problem is always running.

Can anyone suggest, if there's any issue with the approach?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why is "always running" a problem?

You use the Information Server Console to control jobs that use Information Services Director, including any possible need to stop and start "always running" jobs.

And you use "end of wave" behaviour to identify units of work.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

Thanks ray, the problem with "always running" is that i just want the job to run/start on demand when ever job is invoked by webservice. (which is as per topology 2 listed in the IBM site about Designing IBM InfoSphere DataStage and QualityStage jobs as services - http://pic.dhe.ibm.com/infocenter/iisin ... /index.jsp )

Though i can't read premium contents.. :? .will explore server console on start and stop control. also, let me know way to accept array of data inputs coming in from web service into DataStage job.
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

In short, how to accept array of input data from web service into ISD job and run on demand. Right now, I am using ISD output stage and added job parameters equivalent to input data.. but how to accept array of input data from job parameters?

If I use ISD input stage and xml input stage to accept the array of data.. the job becomes "always running"...
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

pass it xml, or a string of comma delimited rows.... put only one column on the output link from the ISDinput Stage, and then pass that to either a pivot or an xmlOutput Stage.... one row in becomes nnnnnn rows after xmlOutput or pivot. There's your "array".

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...however, I still must add my confusion to this thread as to what your ultimate question is.

Let's say that you have an ISD Job that performs a lookup. And you want that ISD Job to handle multiple rows in an array (ie...be able to send up 1000 rows... perform the lookups....and then send back 1000 rows with the looked up results).....

...all you have to do is tell the ISD tooling when you complete the Operation that you want it to accept arrays and deliver arrays as the response.

All will be done. The WSDL will be properly created, and any Java, .NET or other tooling that understands WSDL will be able to properly send up an array and then understand the response that comes back.

...the problem is when you need "DataStage" to be the Web Service Client for such a service. That requires certain techniques....

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

eostic wrote:Are you talking about the WSDL for the service or the Job that "is" your service, or are you talking about how to CALL that service from within ANOTHER DataStage Job?

For the Job that "is" the serv ...
web service will be invoking datastage job on demand to send the data. my datastage to process it as when invoked.

so, my job is the service.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Great. So like we have been discussing, build your Job with something like a RowGen or dummy flat file as the source (NOT isdInput since you don't want the job to be "always on"), with only one row to be processed, and then in a downstream transformer, have a Job Parameter in a derivation that will receive your ENTIRE chunk of input data ....that "chunk" will be xml, concatenated instances of data via a delimeter, or some other creative way of sending up all your rows as an "array". Then parse that "chunk" into as many rows as necessary (pivot techniques, xml parsing, etc.).

That's the whole solution, without using an ISDinput. You'll send up the "chunk" on demand, and then get back multiple rows as an array.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Great. So like we have been discussing, build your Job with something like a RowGen or dummy flat file as the source (NOT isdInput since you don't want the job to be "always on"), with only one row to be processed, and then in a downstream transformer, have a Job Parameter in a derivation that will receive your ENTIRE chunk of input data ....that "chunk" will be xml, concatenated instances of data via a delimeter, or some other creative way of sending up all your rows as an "array". Then parse that "chunk" into as many rows as necessary (pivot techniques, xml parsing, etc.).

That's the whole solution, without using an ISDinput. You'll send up the "chunk" on demand, and then get back multiple rows as an array.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Post Reply