ClarenceG
ClarenceG

Reputation: 163

Call custom-domain REST-Enabled SQL Service from APEX Developer Service

My production app is an APEX application already running in a custom domain (mydomain.com). I've already configured REST-enabled SQL Service, and connected to it successfully from another APEX installation on anther custom domain of mine. So that seems fine.

Now, I've spun up a new APEX Developer Service environment on oraclecloud, and I'm trying to create a REST-enabled SQL Service reference to point to the mydomain.com instance. I'm getting the typical error that says the endpoint does not point to a REST-enabled SQL Service.

In the past, when I've had this problem, I solved it by:

As far as I know, both of those require database and/or filesystem access, which I don't have in the APEX Developer Service environment on oraclecloud.

So, my question is: is it possible to do this and, if so, how?

Upvotes: 0

Views: 504

Answers (1)

Carsten
Carsten

Reputation: 1124

you might execute the following in SQL Commands in order to test networking connectivity between the APEX service and your APEX instance within (yourdomain.com).

declare
    l_result clob;
begin
    l_result := apex_web_service.make_rest_request(
                    p_url =>         'http://server.yourdomain.com/path/to/restenabledsql/_/sql',
                    p_http_method => 'GET' );
    htp.p( 'Status: ' || apex_web_service.g_status_code );
end;

As this block does not pass credentials, it will never work correctly. However, based on the thrown error message, we will hopefully get a better indication about the actual cause.

Upvotes: 1

Related Questions