0 Replies Latest reply: Sep 10, 2013 1:01 PM by user10340065 RSS

    UTL_HTTP working in SQL Query, error when used in procedure

    user10340065

      Hi,

      We are trying to call web service from stored procedure .

      When we run the utl_http.request independently in a query its working fine but when we put that in a stored procedure we are unable to connect. Getting HTTP request failed error.

       

      select utl_http.request("SSL_URL",

                              null,

                              "Wallet Details",

                              'password')

      from dual;

       

      But the same query if we put into procedure getting the error as below,

       

      ORA-29273: HTTP request failed

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

      ORA-28860: Fatal SSL error

       

      All the parameters are set properly w.r.t ACL and Oracle Wallet for SSL .


      grant execute on UTL_HTTP to &&SCHEMA_NAME;

       

       

      --Step1 grant on UTL_HTTP package to schema

       

       

      grant execute on UTL_HTTP to &&SCHEMA_NAME;

       

       

      Created ACL using the below scripts.

       

      begin

      dbms_network_acl_admin.create_acl (

      acl => 'utlpkg.xml',

      description => 'Normal Access',

      principal => 'CONNECT',

      is_grant => TRUE,

      privilege => 'connect',

      start_date => null,

      end_date => null

      );

      end;

      /

       

      begin

      dbms_network_acl_admin.assign_acl (

      acl => 'utlpkg.xml',

      host => '*',

      lower_port => 1,

      upper_port => 35000);

      end;

      /

       

      begin

      dbms_network_acl_admin.add_privilege (

      acl => 'utlpkg.xml',

      principal => '&&SCHEMA_NAME',

      is_grant => TRUE,

      privilege => 'connect',

      start_date => null,

      end_date => null);

      end;

       

      Thanks in advance for the help!!!!!!!