Skip to main content

Hi,

 

With plsql_rest_sender_api.call_rest_endpoint_empty_body I can send the response to the callback function. However, I couldn’t do it with “plsql_rest_sender_api.call_rest_endpoint”. The common callback function returns an error in the second chain of the routing rule. Is it possible?

 

Caused by: oracle.jdbc.OracleDatabaseException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'REST_CALLBACK_TEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
ORA-06512: at "IFSAPP.PLSQL_REST_SENDER_API", line 124
ORA-06512: at "IFSAPP.PLSQL_REST_SENDER_API", line 133
ORA-06512: at line 1

 

Yes, it is possible. I checked the “plsql_rest_sender_API.REST_Common_Callback” procedure. There was a problem with arguments. After that, I added key_ref_ and fnd_user_ arguments to use in the callback function. Now it is transferring response.

 

The Request

REST_Common_Callback (It will use :result, :app_msg_id, :fnd_user, :key_ref as argument to call actual callback function)

Actual Callback 

Response Table

Application Message

 


Hi,

 

I’m currently facing a similar issue. I’ve defined my own callback function to log the response in a custom table:

PROCEDURE Response_Callback_Function(xml_ CLOB, app_msg_id_ VARCHAR2, key_ref_ VARCHAR2, fnd_user_ VARCHAR2)
IS
objid_ VARCHAR2(2000);
objversion_ VARCHAR2(2000);

-- Cursor to get Correlation record obj data
CURSOR Get_Obj(app_message_id_ VARCHAR2) IS
SELECT objid, objversion
FROM c_correlation_log
WHERE app_message_id = app_message_id_;

BEGIN

-- Modify Correlation Log record to add response
OPEN Get_Obj(app_msg_id_);
FETCH Get_Obj INTO objid_,objversion_;
CLOSE Get_Obj;

C_Correlation_Log_API.Write_Response_Payload__(objversion_,objid_,xml_);
@ApproveTransactionStatement(2025-01-14,Manuel Toca)
COMMIT;

END Response_Callback_Function;

Here is how I’m calling this callback function in the asynchronous Rest call:

Plsql_Rest_Sender_API.Call_Rest_Endpoint_Json(rest_service_ => 'C_Task_Status_Change',
json_ => json_,
message_id_ => message_id_,
key_ref_ => key_ref_,
fnd_user_ => 'IFSAPP',
callback_func_ => 'C_Outbound_Util_API.Response_Callback_Function',
http_method_ => 'POST',
http_req_headers_ => http_req_headers_,
sender_ => 'IFSAPP',
receiver_ => 'StatusChange',
message_type_ => 'APPLICATION_MESSAGE',
subject_ => 'StatusChanged');

However, it doesn’t seem like it’s triggering the callback function at all; I don’t see the response logged in our custom table nor do I see that the callback execution log from the Application Messages.

 

Can someone let me know if I missed anything? Thanks.


Reply