Web services

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Web services

Post by mydsworld »

I have a scenario :

Seq File1 -> Web Services Transformer -> Seq File2

Now, if there are 10,000 rows in Seq file1, then in the Web services transformer the web service will be called 10,000 times.
Is it the efficient way to do things or there are any better method available.

Thanks
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

All I can tell you is what a bad design of your Web Service. What's in your seq file 1, 10,000 rows? Each row is a request to the Web Service?
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post by mydsworld »

Each of those 10,000 rows need some kind of lookup thats being offered by a web service.

So, what are the alternative solutions.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Yes...it would be nicer if your service had the ability to be called with an array....and then do all the SOAP work just once, assuming the rows aren't THAT big (an array of 10,000 could create a ridiculously large SOAP envelope that will result in other problems).

Do you know the author of the service? Can you have them adjust it to support arrays on either end?

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post by mydsworld »

1.How to form the array in Datastage side (from the set of incoming rows)?
2.Will the array contain all columns or just the column required for lookup.
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

...first of all, give some careful thought to where you are going here...."batch" activity using Web Services is never going to be a screamer......

First of all, the author of the web service has to be ready to receive, and able to return, an array. If they haven't done that, then it doesn't matter what happens in DS -- you won't have any other options but row by row. This relates to the first question above --- do you know who the author of the service is, and whether they can set it up to handle arrays for you?

Assuming they have, then you have to build the SOAP body yourself and send it into the WSTransformer. ...and you will need all the columns that the Web Service is asking for. ...You will need to be comfortable with both the XMLInput and XMLOutput stages, and become familiar with the option in the WSTransformer to describe a "user defined message". It's fairly involved, but that should get you pointed in the right direction.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post by mydsworld »

If we have multiple records that need to be looked up to a web service then will it be a good design to converge these multiple records (using XML output stage) to a XML file and pass that XML to web service (designed in that way to handle the XML). Then capturing the Web service Transformer response in XML Input stage and flatten to get individual records.
Post Reply