Apps To Fusion

.......Our Journey from Apps To Fusion

 
  • Increase font size
  • Default font size
  • Decrease font size
We have launched several Development, Functional and DBA Trainings. Visiti http://focusthread.com/training

Invoke Web Service via Business Event

With the introduction of Integrated SOA Gateway, there are plenty of new SOA related features in R12.1 version. In this article we will see a video demo of the wizard for invoking webservices via Business Event. In R12.1 you can create a subscription of type "Invoke Web Service". Once you select this subscription, you are then prompted to enter the WSDL of the webservice that must be invoked in response to the business event. This initiates a Web Service subscription wizard in R12.1. These steps are shown in the video link below




How does the business event subscription wizard work?
This wizard parses the WSDL that you are attaching in subscription and then prompts you through a series of questions to select the Method that must be called from Web Service.




How does the webservice get invoked?
The Java WSIF [Web Service Invocation Framework] is used to invoke the desired web service dynamically.




What is WSIF?
Usually, when you wish to invoke a method within the Web Service WSDL, you generate the stubs which act like a "local proxy" for the web service. Using WSIF, the Webservice can be dynamically be geneated. The Business Event Subscription in this case invokes a class named oracle.apps.fnd.wf.bes.WebServiceInvokerSubscription. This class internally reads the definition of the subscription and invokes the Web Service.




What if I want to do additional processing before/after Web Service Invocation via Business Event?
When the business event subscription for Web Service fires, then WebServiceInvokerSubscription.onBusinessEvent() is executed. To do further processing, follow the steps below
1. Extend class WebServiceInvokerSubscription
2. Override methods onBusinessEvent(),preInvokeService(), invokeService()and postInvokeService() as required
3. Place the java class name of extended class in field "Java Rule Function" in Business Event Subscription

Click here to see the video demo of attaching webservice to Business Event Subscription via wizard





How do I process the response of the webervice?
There are two options for you.
Option 1. Use extended class based on WebServiceInvokerSubscription and override the methods to trap the response and process it.
Option 2. Attach the following parameters to the business event subscription
    WFBES_CALLBACK_EVENT
    WFBES_CALLBACK_AGENT
These parameters dictate the name of the business event that will be raised in response to the WebService return message.

Click here to see the video demo of processing response of WebService




One note- I haven't tested this functionality all the way yet. My initial tests indicate that this feature is not 100% production ready yet because some of the legitimate webservices are not getting parsed by WSDL Subscription wizard. The webservice example used in this article is the same as that in Metalink Note 741783.1. However the Metalink note uses the pre-R12.1 technique where wizard was not present.



Comments (7)add
Business Events -- you are calling out -- can you call in?
written by ron , May 13, 2009
Thanks -- wonderful example.

In this example you are triggering a business event to call a webservice -- cool.

Can you expose a business event as a webservice -- so that I can invoke the webservice from an external system?
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , May 13, 2009
Good question Ron.

You can include any business event or interface as endpoints in Integration Respository.
using the SOA Gateway of R12.1, you can generate webservices for these integration points in Integration Repository.
Again using SOA Gateway of R12.1, you can deploy the webservices to the Application Server.

You can use Integration Repository to expose the following as webservices
PL/SQL APIs
XML Gateway
Concurrent Programs
Business Events
Open Interface Tables/Views
EDI
Business Service Object (Service Beans)
Composite Services

Thanks,
Anil Passi
report abuse
vote down
vote up
Votes: +0
...
written by suresh1784 , May 14, 2009
Hi Anil,

Again a good article from you.

is this feature comes with R12.1 or do we need to go for any other integration?

and how can we call a web service method.

Thanks - Suresh
report abuse
vote down
vote up
Votes: +0
...
written by Anil Passi , May 14, 2009
Hi Suresh

This feature comes out of the box in R12.1

When the Business Event Subscription wizard parses the WSDL, it presents you with the list of available methods within the web service. You can see the video demo that explains this step.

Thanks
Anil Passi



report abuse
vote down
vote up
Votes: +0
...
written by Subhankar , June 22, 2009
Hi Anil,

I had a question regarding the note at bottom of article

One note- I haven't tested this functionality all the way yet. My initial tests indicate that this feature is not 100% production ready yet because some of the legitimate webservices are not getting parsed by WSDL Subscription wizard. The webservice example used in this article is the same as that in Metalink Note 741783.1. However the Metalink note uses the pre-R12.1 technique where wizard was not present.

Can you let me know what are these "legitimate webservices are not getting parsed by WSDL Subscription wizard" which are being referred here? The WSDL parser ensures that all external WSDL files outside the firewall get parsed if proper proxy setup is done. Have you come across any WSDLs which have failed doing so....?

Also would like to mentio that the WSDL Subscription wizard is just a wrapper around the pre-R12.1 technique which has been mentioned in the note. Internally it stores the WSDL properties in the same set of subscription parameters as mentioned in the note even now.

Thanks
Subhankar
report abuse
vote down
vote up
Votes: +0
Is this only applicable to R12?
written by OFemi , August 05, 2009
All posting, demos write ups etc have been for R12.
Is this functionality not available in 11i?
If not, is there any doc on enabling webservices on 11i?

Regards,
Femi
report abuse
vote down
vote up
Votes: +0
11i
written by Fernando , August 08, 2009
I have the same question as Femi's.
We don't have any plans yet to migrate to R12 and we need to create/changes all existing interfaces to SOA standards..

that'll be very helpful.

Thanks,
Fernando.
report abuse
vote down
vote up
Votes: +0
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy