operations in services

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

Moderators: chulett, rschirm

Post Reply
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

operations in services

Post by suryadev »

Project--->application----->service------>operation(job)

In this procedure only one service has to be designed.
and three operations what I mean is three jobs.

jobs:-
1. unique_id(request)------->name info(response)5 columns.
2.unique_id(request)---------->addrinfo(response)5 columns.
3.unique_id(request)----------->contactinfo(response)5 columns.

Do I need to create three operations or do I need to create only a single operation with all the three requirements?

Issue is if I create three operations the request should be sent 3 times for getting response for 3 operation/

Is there any way to create single operation or job with all the conditions.
If so 3 completely different outputs but how is that possible in Webservice?

please suggest me!!!
Thanks,
Surya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Both options are possible.... the choice depends on how complex you want the job to be, and what the developers of the client side want to do in terms of work effort and complexity also...

Also consider how often they use option 1, 2 or 3...do they ALWAYS want name, address and contact information? ...or only some of the time? Do they just want name and not need the others?

The absolute easiest is to just have three operations. It's the simplest and cleanest, ESPECIALLY if they often want only one of the three response types.

...but if they ALWAYS want all three, then why have three requests going across the network. Better to do it as one.....but then (you have to decide this yourself) the Job might need to be more complicated. Are the bits of information in the same table? same database? What do you have to do in the job to get all three in the same response? You might need funnels, etc. ....but if you can get them into a single response to a flat file the way that you like, then you'll easily be able to get them as a response in WISD. They can all be on the same row, or another popular option is to put them into a custom XML document and send back the document as one single large varchar column.

All of the above are possible, or you could build 4 operations...one of each for the separate calls and a fourth for "combined"......

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

thanks ernie,
3 operations is better because the "combined" one has to be a large column which is not required by the client.

1 service----------> 3 operations
so coming to the point of 3 operations seperately.
actually there is a mediation module between client and my service internally which is the interface designed for calling different services.

so mediation module(ESB) calls my service.
when I deploy my service all the operations work together right.

when the ESB calls my service can he select any operation among the three and send it to the client?
Thanks,
Surya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Yes...when you create the EJB binding you will generate a client side jar for the developers.......it's been awhile since I've coded the EJB client side, but the Jar should ultimately have three available methods --- one for each operation and each with the proper signature.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

I think suryadev was referring to ESB not EJB :?
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

Yes that was ESB layer but there is a slight change in my issue.



I designed 3 dummy operations for the WSDL.
and the invoked them to the service.

Now the used Soap tool to test the connections and I found there 3 seperate operations.
does the same thing appear to ESB ( the mediation module between client and my service)

and can he select any of the three operations which ever he wants to?
Thanks,
Surya
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

I used three operations but I have a problem with the multiple info.

The request is unique_id and I do look up with person_id.

then a lookup between person_id and name_info.

there are multiple name_info for same person_id.

When the target is a sequential file I can get the multiple name_info for same person_id.
but when the job is invoked as a service I cannot get the multiple name_info for that person_id.

Do I need to do any changes as this is a job related to webservice?


your reply is appretiated.
Thanks,
Surya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Sorry about the binding confusion up above...I often find that developers on an ESB are doing J2EE work and sometimes prefer to use the EJB binding...if they are using SOAP, that's great --- it is FAR easier to use and test and develop, etc...

The same issues apply, however, just that you get 3 operations in the single WSDL, as you have seen.

Your latest concern is abbout muliple rows. You have to tell ISD that you expect multiple rows from a single request, so that it can properly tag the output definition as an "array". When you are in the Operation dialog of the Application, look carefully at the bottom of the screen at the "output tab" (it's also important for input if you ever expect to get multiple rows on the "request" side)......there is a check box there for "group" and then "array"......choose those and save/re-deploy your application and you will get multiple rows returned.

Ernie
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

thanks ernie,



Do I need to check both "array and Group arguments into structure"

only in the outputs If I need multiple output

and in the inputs is there is multiple input.
Thanks,
Surya
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

Yes...check them both.
Ernie Ostic

blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
suryadev
Premium Member
Premium Member
Posts: 211
Joined: Sun Jul 11, 2010 7:39 pm

Post by suryadev »

That works ernie,thanks for your input.
Thanks,
Surya
Post Reply