Skip to Main Content

Cloud Platform

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

APEX_WEB_SERVICE.make_rest_request

oladayo.sNov 19 2017 — edited Nov 27 2017

Hello guys, I'm hoping to get some tips for making https requests in dbaas using APEX_WEB_SERVICE.make_rest_request. Currently i am encountering the error below.

Error report -

ORA-29273: HTTP request failed

ORA-29024: Certificate validation failure

ORA-06512: at "SYS.UTL_HTTP", line 368

ORA-06512: at "SYS.UTL_HTTP", line 1118

ORA-06512: at "APEX_050000.WWV_FLOW_WEB_SERVICES", line 551

ORA-06512: at "APEX_050000.WWV_FLOW_WEB_SERVICES", line 657

ORA-06512: at "APEX_050000.WWV_FLOW_WEBSERVICES_API", line 202

ORA-06512: at "ENDVIADMIN.BTC_ENDVITXN", line 376

ORA-06512: at line 8

29273. 00000 -  "HTTP request failed"

*Cause:    The UTL_HTTP package failed to execute the HTTP request.

*Action:   Use get_detailed_sqlerrm to check the detailed error message.

           Fix the error and retry the HTTP request.

By plsql snippet is as below

begin

apex_web_service.g_request_headers(1).name := 'Content-Type';

    apex_web_service.g_request_headers(1).value := 'application/json';

    apex_web_service.g_request_headers(2).name := 'Authorization';

    apex_web_service.g_request_headers(2).value := 'Basic '||v_authorization_token ;

    apex_web_service.g_request_headers(3).name := 'Accept';

    apex_web_service.g_request_headers(3).value := 'application/json';

    apex_web_service.g_request_headers(4).name := 'Host';

    apex_web_service.g_request_headers(4).value := 'api.infobip.com';

    l_ws_url:=baseurl||'/sms/1/text/single';

l_clob := APEX_WEB_SERVICE.make_rest_request(

        p_url         => l_ws_url,

        p_http_method => 'POST',

        p_parm_name   => APEX_UTIL.string_to_table('payload'),

        p_parm_value  => APEX_UTIL.string_to_table(payload)

      );

......

end

the target host/ service https://api.infobip.com/sms/1/text/single which is used to dispatch sms messages.

I have had a chat with the service provider who confirms there are no certificates from their end of the server.

note: I am by no means a pro at managing wallets however i am keen to learn anything that would get this issue resolved.

dbaas version 12.1.0.2

enterprise edition

@"Hany Ezzat -Oracle"

thanks

This post has been answered by Vlad Uvarov-Oracle on Nov 20 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2017
Added on Nov 19 2017
3 comments
9,413 views