Skip to Main Content

SQL & PL/SQL

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!

ORA-12535: TNS:operation timed out while Calling HTTPS service using UTL_HTTP in Oracle 12c

zenshivaMar 30 2020 — edited Apr 1 2020

Hi Team,

hope you can help me here to fix the issue while calling HTTPS url in Orcale 12c.

I have installed the required certificates into the Oracle wallet created.

When I try to call the HTTPS url I get the below Error:

*

ERROR at line 1:

ORA-12535: TNS:operation timed out

ORA-06512: at "USER1.SHOW_HTML_FROM_URL", line 36

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

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

ORA-06512: at "USER1.SHOW_HTML_FROM_URL", line 13

ORA-06512: at line 1

The HTTPS URL is the IBM ODM wsdl accessed through intranet.

The URL is :

https://hostname.test.com:9443/configuration_rules?wsdl

able to telnet hostname.test.com on 9443 from the database server.

Code is like this:

create or replace PROCEDURE show_html_from_url (

  p_url  IN  VARCHAR2,

  p_username IN VARCHAR2 DEFAULT NULL,

  p_password IN VARCHAR2 DEFAULT NULL

) AS

  l_http_request   UTL_HTTP.req;

  l_http_response  UTL_HTTP.resp;

  l_text           VARCHAR2(32767);

BEGIN

  -- Make a HTTP request and get the response.

utl_http.set_wallet('file:/opt/oracle/wallet', null); -- wallet is created with --nologin option

  utl_http.set_detailed_excp_support(TRUE);

  l_http_request  := UTL_HTTP.begin_request(p_url);

  -- Use basic authentication if required.

  IF p_username IS NOT NULL and p_password IS NOT NULL THEN

    UTL_HTTP.set_authentication(l_http_request, p_username, p_password);

  END IF;

  l_http_response := UTL_HTTP.get_response(l_http_request);

  -- Loop through the response.

  BEGIN

    LOOP

      UTL_HTTP.read_text(l_http_response, l_text, 32766);

      DBMS_OUTPUT.put_line (l_text);

    END LOOP;

  EXCEPTION

    WHEN UTL_HTTP.end_of_body THEN

      UTL_HTTP.end_response(l_http_response);

  END;

EXCEPTION

  WHEN OTHERS THEN

    UTL_HTTP.end_response(l_http_response);

    RAISE;

END show_html_from_url;

Comments
Post Details
Added on Mar 30 2020
9 comments
5,851 views