-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
|Receive Email for New Articles|
|Integrate OA Framework with Web Service||| Print ||
|Written by Anil Passi|
|Tuesday, 02 January 2007|
In this article I will paint a scenario whereby a Web Service can be integrated with "OA Framework" screen. As with delivering any solution, the first stage is design. This article paints a step by step design approach for a business requirement.
How do I explain web service in plain english?
Lets say that there exists an API, written by someone else, hosted somewhere else, but yet I wish to use it. That "someone else" can publish that API over the web. Being published over the web makes it a web service.
What is WSDL? I hear this word a lot
Web Services are usually hosted on a remote server, but yet I need to use it. Not only that, I also need to know the input/output parameters etc. All such parameters and procedures named are defined inWSDL.
For example http://ws.strikeiron.com/textdisguise/CaptchaService?WSDL
This example presents one example of a Web Service integration with Oracle Apps version 11.5.10
We see too many web services examples of Hotel Reservations, Credit Checking etc. Hence I thought it would be usefull to discuss something other than usual credit checking.
To implement a web service that provides captcha interface on a Registration Page.
This could be needed if you want exernal people[registering on your Web Facing SelfService Module] to enter a text from a randomly generated Image. Effectively, when an external person tries to register themselves with Oracle Apps[say Learning Mgmt], you might want them to enter characters as displayed in image. This will keep the spams away from your website, as they won't be able to register.
Why is a web service is required in this case?
You have three options :-
Option 1. Build a small application for Captcha Image yourself
Option 2. Use a standalone free, open source Captcha Software libraries.
Option 3. Use a Captcha web service, from a Web Service provider, for example company called Strikeiron provides a Web Service that will do the following:-
A. Provides an API that "returns URL of an image" with letters embedded within the image
B. Provides another Web Service API to validate/cross check the text entered by the user against the text in image.
If you decide for Option 3, then Web Service is the answer.
Why not use an "off the shelf" software for Captcha?
There are free open source Captcha Software called jCaptcha. http://jcaptcha.sourceforge.net/
However the DBA's will have to maintain that software in case of any bug-fixes. The beauty of web service is that any bug fixes, will be managed by the Web Service provider.
Is there any downside of Web Service approach?
Indeed, the server on which the web service is hosted may be down. Hence you will need some level of SLA[Service Level Agreement]. Also the company providing web service might go bust(yuck). To my surprise I did not find likes of google or yahoo providing a web service. Do you ever see their search engine being unavailable?
Do we need to customize the OA Framework page, to integrate such Web Service in "User Registration Page"?
Not really, you can implement this via OA Framework Extension.
Let me explain this with steps:-
Step A. Generate the stubs for WSDL of the web service
Stub is nothing but a set of java classes that reference the remote web service. WSDL is a URL that service provider like strikeiron provides. jDeveloper will generate those stub classes for you, [you can latter ftp those to JAVA_TOP/oracle/apps/xxcustomdir].
jDeveloper wizards will generate such stubs for you. Effectively it creates local class[just skeleton] files for the remote API[web service]
Step B. Create a new item using personalization, of type "image", on that OA Framework page.
Step B-2. Create another field in which user will type their response. This too can be done using personalization(add new item) of typemessageTextInputBean
Step C. Extend the Controller** on that page and then Substitute the original Controller.
Step D. In processRequest method within controller, call the Web Service to get the URL of captcha image
Step E. Web service api will return URL of captcha image. Assign that URL to image field of step (b)
Step F. Above steps will cause the Captcha image to be rendered on the screen.
Step G. In the processFormRequest of Controller, retrieve the word entered by user, from the field [Step B-2]
Step H. Call the Web Service API again(this time in validation mode). You will possibly pass ID of the captcha image along with response entered by the user. Validation API of Web service will either return true or false, based upon which you can raise error during registration.
Credits: The idea of using Captcha as a Web Service is that from my colleague Sailen Kotecha[ex-Oracle Consultant].
** Oracle does not recommend substitution of Controller, but this becomes inevitable. Better substitute than Customize.
The above steps form the design approach that I wish to undertake to accomplish this task.
The article will be tuned with lessons learnt post successfull implementation of this exercise.
1. 11.5.10 uses jDeveloper version 9.0.3. It remains to be seen how good is that old version for generating Stub Classes[local classes]
The idea behind writing this article is to give you an example of how Oracle Applications Framework might be integrated with a external Web Service. Please leave a comment if you have any questions.
written by Anil Passi , January 04, 2007
written by Anil Passi , January 04, 2007
written by Anish , February 13, 2007
written by Anil Passi , February 13, 2007
written by Anil Passi , April 26, 2007
written by Tripti Goenk , August 07, 2007
written by Vijay Shanmugam , November 20, 2007
Question: May be, it is not related exactly to this article, but any help would be highly appreaciated
written by Dharmesh , February 28, 2008