Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Simplest way to create REST-client inside Oracle Database 12.1+ to call REST-services outside that d

Alexus67Oct 16 2018 — edited Nov 17 2018

Hi All!

Found this article:

https://oracle-base.com/articles/misc/web-services-and-the-oracle-database#consuming-rest-json-web-services

Citation:

Consuming REST JSON Web Services

Prior to Oracle 12c (12.1.0.2), the only way to consume JSON web services in the database was to make a HTTP request to the web service, then use PL/SQL string handling to pull the data apart. Oracle 12c (12.1.0.2) now includes server side JSON support, allowing you to store JSON in the databases and query it as if it were relational data. This functionality is described here.

It would also be possible to load Java-based JSON APIs into the database and call them from PL/SQL.

The APEX_WEB_SERVICE package provides a simple API for consuming REST web services, but it doesn't include any JSON-specific functionality, so it will simplify the process of getting the JSON document, but once you have it you will have to process it manually or with the 12c functionality mentioned previously. You can see an example of using the APEX_WEB_SERVICE package here.

Does that mean that simples answer to question: "Simplest way to create REST-client inside Oracle Database to call REST-services outside that database" is "use APEX_WEB_SERVICE package?"

This post has been answered by Kiran Pawar on Oct 17 2018
Jump to Answer
Comments
Post Details
Added on Oct 16 2018
5 comments
5,698 views