Page 1 of 1

Audit Web services Call

Posted: Thu Jan 27, 2011 2:03 pm
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

Posted: Thu Feb 03, 2011 12:35 am
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.

Posted: Tue Feb 08, 2011 8:28 am
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

Posted: Tue Feb 08, 2011 11:23 am
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