Skip to Main Content

ORDS (2.0 and earlier) remote procedure calls (RPC's)

Recently I had to get an ORDS remote procedure call to work on a CentOS / Apex 4.2 / ORDS 2.0.10 server. I had a hard time finding the right documentation for that old ORDS version, so I thought I'd share how I got it to work finally.

Source:
https://apextips.blogspot.com/2014/11/exposing-procedures-for-url-access-with.html

More info:
https://docs.oracle.com/cd/E37099_01/doc.20/e25066/config_file.htm#AELIG7162
https://matthiashoys.wordpress.com/2013/02/22/http-404403-executing-apex-procedure-from-url-with-oracle-11g-xe/
http://daust.blogspot.com/2006/04/xe-calling-stored-procedures.html
https://stackoverflow.com/questions/40507352/permission-denied-to-procedure

As database schema tedstruik:
As database schema sys:
As OS user oracle:
As OS user root:
In a browser:
Test using a URL like this: http://localhost:8090/ords/tedstruik.output_name?p_name=bob
Result: “Hello bob. You have successfully exposed your procedure using RESTful services.”

Note: sometimes Tomcat is slow to pick up changes, it seems. Wait a bit and/or restart Tomcat again if you get 503/404/403 errors.

ORDS (3.0 and later) remote procedure calls (RPC's)

This is a nice article that demonstrates how to handle output parameters from procedures when using Oracle REST Data Services (ORDS) for remote procedure calls (RPC's): https://oracle-base.com/articles/misc/oracle-rest-data-services-ords-remote-procedure-call-rpc-and-output-parameters

To create and view the configuration, you can use SQL Developer. But sometimes a SQL query is easier, so you can use something like this::