Moving on from the previous article linked here, in this article, you will see how you can expose the BC4J objects as a web service in ADF.
In order to practice this session, it is assumed that you have implemented the preceding articles.
Typically, you may have a custom student management applications whereby a university may create and update student records using an ADF Application.
The ADF BC4J API’s used by the student application can be exposed to Governing Educational institures that might enrol students on behalf of a university.
In such scenario, it is useful to expose the student management API’s as web service. This is very easily done in JDeveloper, as shown in screenshots below.
Give a suitable name to your web service & click Next
Select which operation on the view object you wish to expose to web service
Click on Finish. In few simple steps your web service is ready. In real world, you can deploy this to the weblog server & subject to the firewall, the consumers an invoke this web service. It is for this reason, all your business validations must exist in the Entity Object, to ensure that only valid data is created.
Expand the Application Module now.
The web service can be tested locally on your desktop & invoked.