Oracle ADF has helped us to develop a webservice with ADF BC pretty fast by using the service interface of the App Module.In the last version of this webservice, we just created an EO,VO and exposed the AM methods as a webservice.What if you need a custom functionality written in a custom method in the AM to be exposed as a webservice? We have an option in the service interface of the AM to expose the custom methods in AM as a webservice method too.
Lets start by creating the custom method in the AM.
Step 1: Add below custom method to the AM.
Step 2: Expose the custom method as a webservice method.
Step 3 : Lets run the webservice to test the custom AM method webservice.
Voila.. We are done with exposing a custom AM Method as an webservice operation in Oracle ADF.Though this is not the exact usecase for the custom method, it helps us to understand the usage of custom methods in AM as a webservice operation.
As usual, you can check out the code from code.adfapps.com website from the below url.
Tag Name in SVN : CUSTOM_METHOD_WEBSERVICE