ADF BC REST Services-I

In this blog post, We will see how to expose ADF VOs as REST resources. ADF has got native REST support in 12.2.1 release.

We will use Department, Employee VOs and following AM Data Model here.

Creating Release Version:

Creating a release version in adf-config.xml is the first step to be done before exposing any of the AM VOs as resource. Use the following steps to create one and you can follow your own conventions for versioning REST resources. Here I have given the initial version as r1.

Expose VO as REST resources:

Open AM and navigate to Web Service –> REST and Click + icon.

Creation of REST resources create a new project RESTWebService.jpr in our workspace that can be deployed as WAR through which these REST services get deployed.

Give the resource name as shown below and click OK.

Observe the new RESTWebService project gets created.

Also observe other files related to REST resources that get created as shown below.

You can use the following tabs to choose the methods to be exposed and the attributes to be exposed to consumers.

When a VO has View Links the Resource Structure will show all these VOs as shown below. Check these VOs as shown below if it has to be exposed as child resource.