ADF 12.2.1 provides out of the box support for REST. You should read about all available REST functionality in ADF BC here - 16 Creating RESTful Web Services with Application Modules. I have created very quick sample application to test how it works.
Before generating REST on top of ADF BC, you must configure release version for REST. This can be any number:
To generate REST, go to REST Web Service interface in Application Module and add new REST resource. Here you can select VO and provide REST resource name:
JDeveloper generates REST resource where you could configure attributes to expose, custom methods, etc.:
As soon as you generate REST resource on top of ADF BC, JDeveloper creates new project with web.xml. You could use this project to run/test REST (simply right click and choose Run to test on integrated WLS):
I can test REST through URL: http://127.0.0.1:7101/restapp/rest/1/Employees, ADF returns well structured REST response:
ADF is smart to return only a subset of data, it offers a parameter to control how many rows to fetch in a single call, it also shows if there are more rows to be returned in the result set:
I can set limit parameter to retrieve only one row, this is how it works:
Download implemented sample application - ADFBCRestApp.zip.
Before generating REST on top of ADF BC, you must configure release version for REST. This can be any number:
To generate REST, go to REST Web Service interface in Application Module and add new REST resource. Here you can select VO and provide REST resource name:
JDeveloper generates REST resource where you could configure attributes to expose, custom methods, etc.:
As soon as you generate REST resource on top of ADF BC, JDeveloper creates new project with web.xml. You could use this project to run/test REST (simply right click and choose Run to test on integrated WLS):
I can test REST through URL: http://127.0.0.1:7101/restapp/rest/1/Employees, ADF returns well structured REST response:
ADF is smart to return only a subset of data, it offers a parameter to control how many rows to fetch in a single call, it also shows if there are more rows to be returned in the result set:
I can set limit parameter to retrieve only one row, this is how it works:
Download implemented sample application - ADFBCRestApp.zip.