Create a Webservice using PL-SQL that accepts JSON or XML type input parameters

1.7k Views Asked by At

Basically I want to create a REST Web Service using PL-SQL in Oracle and following are my requirements

  • It should accept string parameter. That string parameter could a JSON format string or XML data
  • It should not accept any parameters on the URL. Rather parameters should be received using http request object.
  • Web service should then able to read the input received and print the details. For ex. A simple web service that receives name of the person in JSON or xml format and then prints back 'Hello ' || Name
1

There are 1 best solutions below

3
On

Yes, you can do this. It can be done a few ways.

Way 1: using Oracle's Rest Listener you can easily setup a web service which is waiting for json or xml payload.

Way 2: using nodejs withan Oracle connector. Setup node to listen for incomming connections. Hand off the json/xml payload to Oracle.

Way 3: using nodeJs / Apache / mod_plsql. Use nodeJs to listen for incoming connection. Then hand off the payload to Oracle by posting the payload to Apache.