Audit Web services Call

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

Moderators: chulett, rschirm

Post Reply
yijuanl
Participant
Posts: 23
Joined: Fri Jun 24, 2005 8:32 am

Audit Web services Call

Post by yijuanl »

Hi,
I would like to audit my web service call. Here is the way I am trying to accomplish this.
I have a WSDI datastage job and deployed it in Director. The user needs an assigned application acronym as a parameter to call the web service. The paralelle job receives the acronym and look up the oracle DB table. If the lookup stage returns 1 row count, meaning the validation is sucessful and the data can send to the requester, otherwise no data but the mesaage "Invalid application acromyn" will send to the requester.

I have problem to send the Invalid message. Here is my stage variables:
If IsNull(lkpoutMitreHoliday.holiday_date) Then "Invalid Message" Else lkpoutMitreHoliday.holiday_date

Can you please help me with this? Or Please let me know if you have any better way to accomplish this.
Thanks in advance!
Yijuan Liu
yl
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your example does not match your problem. How are you doing the Lookup? Are you using a conditional lookup based on the parameter having the value 1? Please provide more detail of your design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
yijuanl
Participant
Posts: 23
Joined: Fri Jun 24, 2005 8:32 am

Post by yijuanl »

Thank you so much for your reply!
I am thinking to change my job design. My requirement is to validate the value of the application acronym in the first parameter from the Web service call. If validation is successful, Web service data will be sent to the user, otherwise some user friendly message will be sent to the user either through email or through SOAP/REST.
To do this, the Oracle connector stage will query the Web service Data joining with validation query, if there is no result returned(meaning the validation failed), some user's friendly message will be sent out. If there is result returned, the web service data will be sent to the user through IBM service director as of SOAP/REST.
My problem is I do not know what is the best way to send out the user friendly message. I am thinking to use the job property to exec SH. In the shell script, I will use DSGetLinkInfo to get the link rowcount. If the rowcount is zero, email will be sent out. otherwise do nothing. But I wish I could get some sample code to write this piece of code.
Any help would be much appreciated.
Jane
yl
eostic
Premium Member
Premium Member
Posts: 3838
Joined: Mon Oct 17, 2005 9:34 am

Post by eostic »

It shouldn't be this difficult...... build some simple jobs to test the technique. It's perfectly fine to test a column returned from a lookup (usually with IsNull() in a downstream transformer), and if it is null, set a "user message" as desired to be returned to your calling web service client.

test it first with flat files, but you should be able to do this just fine.

Ernie
Ernie Ostic

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