Web Service Requests Using Credential_static_id outside APEX in a DataBase Scheduler Job gives ORA-01403
(Doc ID 2967518.1)
Last updated on AUGUST 11, 2023
Applies to:
Oracle Application Express (APEX) - Version 23.1 and laterAutonomous Database Serverless - Version N/A and later
APEX Application Development - Version NA and later
Information in this document applies to any platform.
Symptoms
On : APEX 23.1 version, SQL Workshop
When attempting to use apex web services API with credential_static_id
the following error occurs.
- Apex Web Service Request calls running in an anonymous block from DBMS Scheduler Job are failing.
- It returns No Data Found error:
ERROR
-----------------------
ORA-01403: no data found ORA-06512: at "APEX_230100.WWV_FLOW_CREDENTIAL", line 116 ORA-06512: at "APEX_230100.WWV_FLOW_CREDENTIAL", line 107 ORA-06512: at "APEX_230100.WWV_FLOW_WEBSERVICES_API", line 454 error occured ORA-06512: at "APEX_230100.WWV_FLOW_CREDENTIAL", line 116 ORA-06512: at "APEX_230100.WWV_FLOW_CREDENTIAL", line 107 ORA-06512: at "APEX_230100.WWV_FLOW_WEBSERVICES_API", line 454 ORA-06512: at "XXERP.XXSC_ERP_COMMON_UTIL_PKG", line 1419 ***EXCEPTION: ORA-01403: no data found
- Web Credentials are saved in workspace in the apex instance.
STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Use code like:
-------
PROCEDURE update_data (URLparameeterX IN VARCHAR2,
...
BEGIN
l_envelope := 'x...
....
apex_web_service.g_request_headers (1).name := 'Content-Type';
apex_web_service.g_request_headers (1).VALUE := 'text/xml';
apex_web_service.g_request_headers (1).name := 'charset';
apex_web_service.g_request_headers (1).VALUE := 'UTF-8';
l_result :=
apex_web_service.make_request (
p_url => 'https://' || URLparameterX
p_action => '<REST_URL>',
p_envelope => l_envelope,
p_credential_static_id => my_credential_static_id <<<<<<<<<<< Credentials stored in an APEX Workspace
);
...
END update_data;
Changes
Trying to use a credentials for a working web service
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |