<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color

Related Items

Home arrow Technical Articles arrow Oracle Application Framework arrow Integrate OA Framework with Web Service
This website has now moved to http://apps2fusion.com





Integrate OA Framework with Web Service | Print |  E-mail
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.


Business Requirement
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.


Challenges:-
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.
Comments (9)add
...
written by Anil Passi , January 04, 2007
Hi Vishal,

I think the only way is to customize.
Use a Java Script to pop a message. But you will need to customize login page.

Thanks
Anil Passi
...
written by Anil Passi , January 04, 2007
Hi Vishal,

I think the only way is to customize.
Use a Java Script to pop a message. But you will need to customize login page.

Thanks
Anil Passi
...
written by Anish , February 13, 2007
Hi Anil,

Here is another example of integrating Web services with OAF, this time calling the google search api from J Dev.
http://www.oracle.com/technology/oramag/webcolumns/2003/techarticles/balusamy.html

Also for other google apis, please see http://code.google.com/

Regards
Anish.
...
written by Anil Passi , February 13, 2007
Hi Anish

Thanks for sharing this.

Unfortunately google API have stopped issuing new Keys. Without having google-api-key you cant test their webservices. Hence you will find that its not possible to mimic those steps at your end.

Thanks,
Anil Passi
...
written by Anil Passi , April 26, 2007
Hi ANjani

You need to include the DFF into the page your personalization.

Use the following steps
To display the Flexfields attribute:
1. click Personalize Region link.
2. Expand the hierarchy structure and click Personalize to open the Personalization
Properties page.
3. To display the flexfield, change the value in the Render column to True
4. To display all flexfield attributes, leave the Flex attribute List field blank.
To display only selected attributes, enter the attributes in the Flex attribute List
using the following format:
context1|attribute1|attribute||context2|attribute 1
For example,
Global Data Element|Home Address|Home Phone
5. Apply the personalizations

Thanks,
Anil Passi
...
written by Tripti Goenk , August 07, 2007
Hi,

Requirement -> To run existing page from custom schema, instead of apps schema Here custom schema has the exact table structure as the normal apps but with few extra records which're missing in apps. This page is only for searching records from db schema and based on expert VO.

Steps perfomed:
1. For this, i exported the page and all its BC4J components on respective folders of jdev/myprojects dirrectory
2. Created database connection with custom schema.
3. modified dbc file (FNDNAM) with custom schema name.

TEST:
While testing it from jdeveloper it correctly fetches data from custom schema whereas when i import this page on server with username and password of my custom schema it still shows data only from apps.

Question: Can you please guide how do we pass connection information for execution, apart from import command?

Please reply.

Thanks
Tripti

...
written by Anil Passi , August 07, 2007
Hi Tripti

You simply need to create a synonym into the apps schema.
The synonym will point to the table in your bespoke/custom schema.

OA Framework security connects to APPS Schema only.

Thanks,
Anil Passi
Techstack requirement
written by Vijay Shanmugam , November 20, 2007
I understand the stub approach to invoke the API. But does Oracle Apps 11i techstack provide required soap client libraries or we need to include libraries? I am sure in R12, the 10.1.3 techstack provides required soap jars but was not aware if it was possible in 11i.

Thanks
Vijay
Question: May be, it is not related exactly to this article, but any help would be highly appreaciated
written by Dharmesh , February 28, 2008
Hi Anil,

I've a question and I couldn't find forums in this website so I'm asking here. I'm sorry if it is not appropriate to ask here.

I've created one JSP that I'm calling from OA Framework (Self Service Page). I want to access OA Framework's current ApplicationModule and ViewObjects in this JSP. How do I do that?


I found following code from metalink, but I don't know what to pass as "applicatioId".

oracle.jbo.http.HttpContainer httpc = oracle.jbo.http.HttpContainer.getInstanceFromSession(pageContext.getSession());
oracle.jbo.common.ampool.SessionCookie cookie = httpc.getSessionCookie(applicationId);
am = (oracle.jbo.ApplicationModule)cookie.useApplicationModule();

Any help will be highly appreciated.

Thanks!
Dharmesh
You must be logged in to a comment. Please register if you do not have an account yet.

busy