Quantcast
Channel: Oracle Blogs | Oracle Shay Shmeltzer's Blog
Viewing all articles
Browse latest Browse all 200

REST based CRUD with Oracle ADF Business Components

$
0
0

A key new feature in Oracle ADF 12.2.1 is the ability to expose ADF Business Components through REST/JSON interfaces.

REST/JSON is the preferred interface for many client side UI technologies to access remote backend services - as examples both Oracle JET and Oracle MAF leverage REST as the way to access data from remote servers. 

Oracle ADF makes it very simple to expose your existing business components as REST services - all through a declarative set of dialogs.

Once you published the service interface for a view object, you should be able to do the full set of CRUD operation on that object through different REST action:

GET - will do a Read

POST - will do a Create

PATCH - will do an Update

DELETE - will do a Developer

One thing that you'll want to verify is that when you are passing JSON data back into the REST interface you specify in the header that:

Content-Type is application/vnd.oracle.adf.resourceitem+json

otherwise you'll get an error along the lines of:

oracle.adf.internal.model.rest.core.exception.CannotParseContentException: The content type is not a ADFm REST entity. Content-Type: text/plain 

In the video below I show very quickly how to expose a REST interface and then how to invoke all the CRUD operations directly from the chrome app "Postman". 

These new feature can make your Oracle ADF business services part of any new application that prefers to use REST/JavaScript/HTML5 type of architecture.

Read more about exposing Oracle ADF BC as REST in the documentation


Viewing all articles
Browse latest Browse all 200

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>