Skip to Main Content
Feature Request FR-4347
Product Area Web Services
Status CLOSED

1 Voters

Change Request: apex_web_service should use utl_http.create_request_context

rode.mb Public
· Mar 21 2025

Idea Summary
apex_web_service.make_rest_request should use create_request_context instead of set_wallet.

This won't have changes for the user but it can prevent possible (rare and random) bugs at runtime.

Use Case
You can reproduce this bugs on a later 19c release. Since (about) 19.19 there is a (inofficial) backport for “wallet_path=system:” - actually this works fine. but you have to use request context or you will run into random ORA-29248 exceptions.

create a scheduler job that calls a url every minute and check the user_scheduler_job_run_details later…:

DECLARE
  x CLOB;
BEGIN
  x := apex_web_service.make_rest_request(p_url         => 'https://oracle.com',
                                          p_http_method => 'GET',
                                          p_wallet_path => 'system:');
END;

It seems to be some issue of utl_http, because in 23ai the issue is not reproducable, but using request context would not hurt at all.

Preferred Solution (Optional)
Some small modifications in WWV_FLOW_WEB_SERVICES_INVOKER should be enough.

We reviewed this idea carefully, and while it was interesting, we concluded that due to all the internal implications we need to take into account, it is unlikely to make its way into APEX.

Comments

Comments

  • carsten.czarski APEX Team OP 4 weeks ago

    I just had a look into the documentation for UTL_HTTP.SET_WALLET (19c | 23ai). On 19c, the system: prefix is not mentioned at all. So, even if that technically works, there might be other caveats as well - probably the reason why this is not documented. 

    So all in all I would not recommend to use this on 19c at all. Instead - as we always did: place the wallet on a folder in the operating system, and use the wallet path with APEX_WEB_SERVICE or configure in the INTERNAL workspace. On 23ai databases, nothing stops you from using the system: prefix.

    Even though the create_request_context procedure might help in that case - at the end it's working around issues you're getting by using undocumented functionality in 19c databases. To be honest, I'm struggling to see the need for changing the APEX_WEB_SERVICE infrastructure with all required testing overhead and risk involved for that purpose ...