Utl_http.request

Hello every one
i m using oracle 10g database and simply try to use this utility utl_http.request so i put the command in sql plus
SELECT utl_http.request('http://www.google.com') FROM dual
but this showing error
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1577
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at line 1
any one can help me regarding that
Avinash
Edited by: user7312999 on Aug 3, 2010 6:19 AM

Thats becaure you are trying to access the URL from behind the firewall. Use the proxy settings to access the website. Something like:
SQL> SELECT utl_http.request('http://www.google.com') FROM dual
  2  /
SELECT utl_http.request('http://www.google.com') FROM dual
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1573
ORA-12545: Connect failed because target host or object does not exist
ORA-06512: at line 1
SQL> ed
Wrote file afiedt.buf
  1* SELECT utl_http.request('http://www.google.com','<proxyIPAddress>:<Proxy port>') FROM dual
SQL>
SQL> /
UTL_HTTP.REQUEST('HTTP://WWW.GOOGLE.COM','<proxyIPAddress>:<Proxy port>')
<!doctype html><html><head><meta http-equiv="content-type" content="text/html; c
harset=ISO-8859-1"><title>Google</title><script>window.google={kEI:"XxRZTNGlJc-8
rAeJp7SjDg",kEXPI:"23051,25242,25655",kCSI:{e:"23051,25242,25655",ei:"XxRZTNGlJc
-8rAeJp7SjDg",expi:"23051,25242,25655"},ml:function(){},kHL:"en",time:function()
{return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc
,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||"/g
en_204?atyp=i&ct="+b+"&cad="+d+"&zx="+google.time();a.src=c;e.li=f+1},lc:[],li:0
,Toolbelt:{}};
window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime
()}}};try{}catch(u){}window.google.jsrt_kill=1;
var _gjwl=location;function _gjuc(){var e=_gjwl.href.indexOf("#");if(e>=0){var a
UTL_HTTP.REQUEST('HTTP://WWW.GOOGLE.COM','<proxyIPAddress>:<Proxy port>')
=_gjwl.href.substring(e);if(a.indexOf("&q=")>0||a.indexOf("#q=")>=0){a=a.substri
ng(1);if(a.indexOf("#")==-1){for(var c=0;c<a.length;){var d=c;if(a.charAt(d)=="&
")++d;var b=a.indexOf("&",d);if(b==-1)b=a.length;var f=a.substring(d,b);if(f.ind
exOf("fp=")==0){a=a.substring(0,c)+a.substring(b,a.length);b=c}else if(f=="cad=h
")return 0;c=b}_gjwl.href="/search?"+a+"&cad=h";return 1}}}return 0}function _gj
p(){!(window._gjwl.hash&&
window._gjuc())&&setTimeout(_gjp,500)};
window._gjp && _gjp()</script><style id=gstyle>body{margin:0}#gog{padding:3px 8p
x 0}td{line-height:.8em;}.gac_m td{line-height:17px;}form{margin-bottom:20px;}bo
dy,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:
#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-styl
UTL_HTTP.REQUEST('HTTP://WWW.GOOGLE.COM','<proxyIPAddress>:<Proxy port>')
e:normal}.lst{width:496px}.tiah{width:458px}input{font-family:inherit}a.gb1,a.gb
2,a.gb3,a.gb4{color:#11c !important}#gog{background:#fff}#gbar,#guser{font-size:
13px;padding-top:1px !important}#gbar{float:left;height:22px}#guser{padding-bott
om:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-s
ize:1px}.gbh{height:0;position:absolute;top:24px;width:100%}#gbs,.gbm{background
:#fff;left:0;position:absolut
SQL>or
SELECT utl_http.request('http://www.google.com','[email protected]') FROM dualEdited by: AP on Aug 4, 2010 12:21 AM
Edited by: AP on Aug 4, 2010 12:22 AM

Similar Messages

  • Run a report in PL/SQL using utl_http.request

    Hi
    I need to run a report in PL/SQL using utl_http.request
    How that can be done ??
    Thank you!

    Okay, backtrack.
    A web server can deliver all kinds of content. From static HTML pages, to XML files and videos and dynamic content. Including reports.
    The communication language (protocol) used to talk to a web server is HTTP.
    UTL_HTTP is an Oracle PL/SQL library that implements the client side of this communication. It allows the developer to write code that acts like a web browser and communicates with a web server.
    Now what do you not understand and cannot use?
    HTTP is not simple and easy. You need to understand the basics of this communication language in order to communicate successfully with the web server. Like knowing the difference between GET and PUT and POST commands, how the URL query string works and so on.
    Once you know that, you can look at how the web server provides reports. How do you authenticate as a web browser with the web reporting system? What URLs do you use to access which reports? How do you pass name-values to the web server as report parameters? What HTTP response formats (MIME types) does the web report server provide? Which one do you plan to use and how do you parse that response into a meaning structured data format?
    If you're thinking it is "easy", think again. Sure, someone here can provide sample code that for example grabs a CSV report file from a web server and (using a pipeline table function), turn that into rows and columns. But that will not teach you the fundamentals you need to know and not equip you with dealing with the problem with your own brains, hands and keyboard.
    PS. In other words, learn to crawl and walk before trying to run. Get to grips with how HTTP works before diving into the deep end of web report integration.

  • How to Display PHP Output as Portlet in HTML Region using utl_http.request

    I wanted to be able to parse PHP functions to add more functionality to my Page. nothing fantasy, something simple like: http://phpsysinfo.sourceforge.net/phpsysinfo-dev/?template=classic
    Where the realtime values are retrieved from the OS. this represent some kind of problem to me, I know how to do it from Shell Script, Perl or PHP, but not from PL/SQL.
    Based on my experience using Oracle Portal, Portlets, I think we really can make use of the feature used in Portal called Web Clipping. [ This feature basically goes to some Site a retrieve part of the site to show in the current page]. Well the PL/SQL utility utl_http.request does something similar.
    Make sure your request page does not retrieve some headers because that would cause a problem in your page and will not show up.
    This is what I did:
    <b> 1.- </b> Grant Privileges to execute [ <b> utl_http.request </b> ] to the owner of your schema.
    login into the OracleXE / APEX as SYS then go to the Object Navigator, then click on packages, find the utl_http.request then click on it, later click on grant and select your schema owner for your applicaion.
    <b> 2.- </b> Logout as SYS then login as your application schema user. just to test the functionality go to the sql command then enter the following command and then click run:
    <b> select substr(utl_http.request('http://www.oracle.com/'),1, 255) from dual; </b>
    If your output is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Oracle 10g, Siebel, PeopleSoft | Oracle, The World's Largest Enterprise Software Company</title> <meta name="title" content="Enterprise Applications | Database | Fusio
    <font color='blue'> Wow It worked </font>, this really could be useful !!, If not go back to step 1 and check your permissions to execute, or perhaps your Internet connectivity.
    3.- Once we know the package works and we can retrieve content from the Internet. lets go to some of our pages add some HTML Region.
    4.- Create an item and put into the new region. the source will be SQL, For the purposes of my test the query to the Oracle Page failed, so I decided to give a shot with a simple PHP script with no headers.
    The internal server is: http://mytest.com/hello_world.php
    Where the content of the hello_world.php is:
    <?
    echo '"<b> Hello World </b> ";
    ?>
    This PHP works fine and display the basic Hello World. can be the same server or not, also noticed this can be another port perhaps using something like Ruby,Mason or Java.
    <b> 5.- </b> Finally in my Item the source type is SQL and looks like this:
    <b> select substr(utl_http.request('http://mytest.com/hello_world.php'),1, 255) from dual; </b>
    Apply the changes and run the page !!!
    Excelent It worked as expected. now you know how use utl_http.request to create webclipping in your OracleXE / APEX from remote pages, or how to use it to parse the output from CGI, Perl, PHP, Ruby or Java pages.
    Note: [ Just make sure to strip the headers or parse into a PL/SQL Procedure to clean then show ]
    Best Regards <b> Dino </b>.
    Brains R Like Books only work when they R Open.
    http://www.htmldbhosting.com/

    Sorry, from your post in the LabVIEW board I did not understand that it was the Output message that you were looking for.
    I thought you wanted the results from your test steps displayed on the user interface. 
    It is the “Output Panel” in the sequence editor that displays your output message, but I do not know if there is default Output panel activeX indicator for user interface that the TestStand engine would update automatically like it does the execution view.
    Maybe someone else knows 
    As also pointed out, the UI messages is your other option.
    The Output Message event number is 40 
    http://zone.ni.com/devzone/cda/epd/p/id/3879
    UIMsg_OutputMessages–(Value: 40) TestStand sends this message at periodic intervals when it holds references to output messages that calls to the OutputMessage.Post method queue. TestStand transfers the queued messages to an OutputMessages collection attached to the UIMessage.ActiveXData property for this event. An application that processes output messages should copy the output message references from the collection in UIMessage.ActiveXData to its own private OutputMessages collection by passing its private collection to the OutputMessages.CopyMessagesToCollection method. An application calls the Engine.NewOutputMessages method to create a private OutputMessage collection. TestStand generates this event only if the Engine.OutputMessagesEnabled property is True. Because there can be more than one handler for this event, the application should not modify the OutputMessages collection the UIMessage.ActiveXData property holds.
    Omar
    Message Edited by OmarGator on 10-09-2008 10:12 AM

  • UTL_HTTP.request, operation timed out error

    hi,
    i am using utl_http package, its giving the following error:
    SQL> SELECT utl_http.request('http://www.oracle.com/') FROM dual;
    SELECT utl_http.request('http://www.oracle.com/') FROM dual
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1556
    ORA-12535: TNS:operation timed out
    ORA-06512: at line 1
    please tell me what can be the probable reasons, as i am able to connect the same url through my IE browser.
    thanks

    Hi Sean,
    I informed the senior developer and she said she has emailed the Oracle regarding this issue. We are developing a website for a company who has purchased the Oracle CRM on demand. Is it mandatory for every one to create a service request? You can email me at [email protected] and I will contact you directly.
    Thanks
    Jay

  • Error while using utl_http.request :ORA-12535: TNS:operation timed

    Hi.
    I'm using 11g
    I'm trying to use utl_http.request
    I tried select utl_http.request('http://srvab.us.oracle.com') from dual;
    and get the below error
    Error report:
    SQL Error: ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1577
    ORA-12535: TNS:operation timed out
    ORA-06512: at line 1
    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.
    I have tried the below steps after checking Oracle KM
    BEGIN
    DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'ACL_OPSLOG.xml',
    description => 'ACL SRVAP AUTOSR PURPOSES',
    principal => 'username',
    is_grant => true,
    privilege => 'connect',
    start_date => null,
    end_date => null );
    COMMIT;
    END;
    BEGIN
    DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
    acl => 'ACL_OPSLOG.xml',
    host => '*.us.oracle.com',
    lower_port => null,
    upper_port => null);
    COMMIT;
    END;
    But still no luck.Please assist
    Thanks
    Archana

    According to the exception, the error is not ACL related, but network related.
    Basic test. Connect to the Oracle server using a console (e.g. ssh or telnet into the server). On that server, test the network connectivity to the web server. E.g.
    telnet srvab.us.oracle.com 80If this fails, then so will PL/SQL code in that Oracle server.

  • Utl_http.request for https site

    Hello
    I am running the following using sqlplus login in as sys as sysdba (also tried login as the end user)
    SELECT utl_http.request('https://www.accestochina.com', 'null', 'file:C:\wallets', 'XXX - Password has been entered here - XXX') FROM dual;
    ERROR at line 1:
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1722
    ORA-12545: Connect failed because target host or object does not exist
    ORA-06512: at line 1
    The platform I using is
    CORE 11.2.0.1.0 Production
    NLSRTL Version 11.2.0.1.0 - Production
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    TNS for 64-bit Windows: Version 11.2.0.1.0 - Production
    Having spent a while looking into the problem without success any ideas / solution very welocome
    Thanks for looking, Pete

    The wallet needs to be stored on the Oracle server.
    Using +$ORACLE_HOME/bin/owm+ you create a wallet file and import (copy-and-paste) the web server's certificate in PEM format.
    PL/SQL code then needs to use the wallet on the server:
    SQL> create or replace function WebBrowser( url varchar2 ) return TStrings pipelined is
      2          WALLET_FILE     constant varchar2(4000) := 'file:///<oracle_home_goes_here>/owm/wallets/oracle'; --// default 11gr2 wallet location
      3          WALLET_PASSW    constant varchar2(4000) := 'wallet_password_here;
      4 
      5          -- our local variables
      6          proxyURL        varchar2(4000)   := 'http://username:[email protected]:80';
      7          request         UTL_HTTP.req;
      8          response        UTL_HTTP.resp;
      9          buffer          varchar2(4000);
    10          endLoop         boolean;
    11  begin
    12          UTL_HTTP.set_response_error_check( true );
    13          UTL_HTTP.set_detailed_excp_support( true );
    14          UTL_HTTP.set_wallet( WALLET_FILE, WALLET_PASSW );
    15          UTL_HTTP.set_proxy( proxyURL, null );  --// comment out if proxy access is not used
    16 
    17          request := UTL_HTTP.begin_request( url, 'GET', UTL_HTTP.HTTP_VERSION_1_1 );
    18          UTL_HTTP.set_header( request, 'User-Agent', 'Mozilla/4.0 (compatible)' );
    19          response := UTL_HTTP.get_response( request );
    20 
    21          endLoop := false;
    22          while not endLoop loop
    23                  begin
    24                          UTL_HTTP.read_line( response, buffer, true );
    25                          if (buffer is not null) and length(buffer)>0 then
    26                                  pipe row( buffer );
    27                          end if;
    28                  exception when UTL_HTTP.END_OF_BODY then
    29                          endLoop := true;
    30                  end;
    31          end loop;
    32          UTL_HTTP.end_response( response );
    33          return;
    34 
    35  exception when OTHERS then
    36          pipe row( SQLERRM );
    37  end;
    38  /
    Function created.
    SQL>  --// wallet contains OTN certificate
    SQL> select * from TABLE(webbrowser('https://forums.oracle.com'));
    COLUMN_VALUE
    <html>
    <SCRIPT LANGUAGE="JavaScript">
    window.location="https://forums.oracle.com/forums/index.jspa";
    </script>
    <noscript>
    </html>
    6 rows selected.
    SQL>

  • Is it possible to invoke IE with UTL_HTTP.Request

    Hi,
    Is it possible to invoke IE with UTL_HTTP by specifying the URL?
    DECLARE
    LV_RET VARCHAR(2000);
    BEGIN
    SELECT UTL_HTTP.REQUEST('http://www.oracle.com')
    INTO LV_RET
    FROM DUAL;
    END;
    Thanks in Advance
    Thanks & Rgds
    M T

    Hi!
    Pls go through the following link --
    [url http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Utl_Http_Package_Enhancements/Cr_Using_Utl_Http.htm]UTL_HTTP In Oracle
    Regards.
    Satyaki De.

  • Use utl_http.request,how to replace '&'  in http address?

    There are some '&' in http address,as utl_http.request paramater,for example,
    dd:=utl_http.request('http://127.0.0.1:7778/forms/frmservlet?config=test&form=test_form.fmx');
    will raise error. I want to replace the character '&',How to replace it?

    Hi,
    I am using : ..'%26param'.. for '&param'
    Hope it helps,
    Friedhold

  • Unable to receive special characters in XML using UTL_HTTP request from Other application

    Hi Team,
    We are using SOAP request in Oracle Application to Pull XML data from Other application.I am using below commands before receving response but still i am unable to receive special charcters/Spanish Charcters in XML.
    utl_http.set_body_charset(v_http_req, 'UTF-8');
    utl_http.set_header (v_http_req, 'Content-Type', 'text/xml');
    Thanks and Regards,
    Raghul

    Hello,
    Just when you think that you know everything, it is slammed in your face that you don't. The .Mac member name field in the System Preferences DOES NOT take your whole e-mail address. It only takes your user name or whatever comes BEFORE the "@" symbol. There was absolutely nothing wrong with my MacBook Pro (other than ther brain dead user).
    Sorry for wasting your time...
    If we learn from our mistakes, then I obtained my PhD years ago,
    Dr. Z.

  • Xml query hungs up with large xml response from utl_http request

    We are having very sensitive problem in Production environment with xmlquery.
    When receive a small or medium size xml, the query shown below works. But when the xml is large or very large its hung and slow down all the database.
    We are with Oracle 11gR2
    We are using clob to parse the response from the http request.
    What could be the problem or the solutions?. Please help. Its urgent...
    SELECT opciones_obj (x.strindice,
    x.nombrecompleto,
    x.nombre,
    x.strtipodato,
    x.codigoopcion,
    x.floatval,
    x.strtipo,
    x.strval)
    BULK COLLECT INTO t_opciones
    FROM XMLTABLE (
    xmlnamespaces (
    'http://schemas.xmlsoap.org/soap/envelope/' AS "env",
    'http://wsevaluarreglacondicioncomercial/' AS "ns0",
    'http://wsevaluarreglacondicioncomercial/types/' AS "ns1",
    'http://www.oracle.com/webservices/internal/literal' AS "ns2"),
    '/env:Envelope/env:Body/ns0:listarOpcionesAtributoEventoResponseElement/ns0:result/ns1:listaVariables/ns2:item/ns2:item'
    PASSING rsp_xml
    COLUMNS strindice VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strIndice"]/ns2:value',
    nombrecompleto VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="nombreCompleto"]/ns2:value',
    nombre VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="nombre"]/ns2:value',
    strtipodato VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strTipoDato"]/ns2:value',
    codigoopcion NUMBER
    PATH 'ns2:mapEntry[ns2:key="codigoOpcion"]/ns2:value',
    floatval FLOAT
    PATH 'ns2:mapEntry[ns2:key="floatVal"]/ns2:value',
    strtipo VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strTipo"]/ns2:value',
    strval VARCHAR2 (4000)
    PATH 'ns2:mapEntry[ns2:key="strVal"]/ns2:value') x;

    What could be the problem or the solutions?1) Create an XMLType table (could be temporary) using binary XML storage :
    create table tmp_xml of xmltype
    xmltype store as securefile binary xml;2) In your procedure, load the XMLType containing the response (rsp_xml) into the table :
    insert into tmp_xml values (rsp_xml);3) Then, execute the query directly from the table :
    SELECT opciones_obj ( ... )
    BULK COLLECT INTO t_opciones
    FROM tmp_xml t
       , XMLTABLE (
             xmlnamespaces ( ... ),
             '/env:Envelope/env:Body/...'
             PASSING t.object_value
             COLUMNS ...4) At the end of the procedure, delete (or truncate) the table or simply let the table delete itself when the session ends (in case you created it TEMPORARY)

  • Utl_http ssl request error

    Hi
    Oracle 8.1.7, solaris 8
    I have a problem using utl_http.request with SSL
    I export certificate from Internet explorer, set up wallet manager and import
    certificates with wallet manager.
    But when I access secure sites using sql*plus I got an error
    select utl_http.request('https://securesites',null, 'file:/oas/wallets',
    'wallet_passwd') from dual;
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_HTTP", line 174
    ORA-06512: at line 1
    I have seen the same problem in metalink but no clear solution!
    Viesturs

    How does your question relate to the Oracle Forms product? I recommend you post your question in the PL/SQL forum. If you have a general Forms question, by all means, ask it here! ;-)
    Craig...

  • Sys.utl_http stopped working in batch; still works in APEX?

    We have a package in Oracle 11gR1 that runs a nightly "job" to produce reports; it is designed to call the Oracle Reports server via URL and create a report as pdf, then save it to a directory in the Oracle LINUX filesystem. The call in the output procedure is simple:
               MY_URL :=
    'http://refugee1.dcf.state.fl.us:7777/reports/rwservlet?server=repRefugeeTest&report=DELIVERABLE_RPT.rdf&destype=FILE&desformat=pdf&userid=ruser/collins@RPD&desname=/app/oracle/external_files/official_reports/MAY_2014_DELIV.pdf&contract=XK030&report_beg_d=05/01/2014&report_end_d=05/31/2014&subc=&sticker=OFFICIAL REPORT';
                UTL_HTTP.SET_TRANSFER_TIMEOUT (180);
                MY_HTTP_RTN := UTL_HTTP.REQUEST (MY_URL);
                UTL_HTTP.SET_TRANSFER_TIMEOUT (60);
    This Oracle package has worked for years with user RPD, until we moved up some rdf and report package changes yesterday.  These same four commands still work fine using APEX (with user APEX_PUBLIC_USER) in a windows-based browser (Firefox and IE), but this command UTL_HTTP.REQUEST does not produce output anymore from the Oracle package (with user RPD) and throws no exception.  There is no job in the Oracle Reports queue (exception or not) to show that the request was passed.  And, if I paste the string of MY_URL into a windows-browser, then it runs and Oracle Reports shows the job.  I'm stumped!  Please help shed light on the mystery; how can I trace or trap what's (not) happening?

    Does
    aplay -Dplug:iec958 /usr/share/sounds/alsa/Front_Center.wav
    work?
    Did you try this while running a DE? Did you try disabling/enabling powersaving?
    Last edited by Tes-- (2012-06-03 18:47:40)

  • HTTPS request signed by client certificate from PL/SQL procedure

    Hi All, please help.
    The PL/SQL procedure connects to different web services, using both HTTP/HTTPS, for HTTPS sever certificates were used. Everything was OK.
    The next service requires client to sign requests with client certificate. I made the client certificate, sign it by CA, store it in Wallet Manager.
    Is here the possibility to send signed HTTPS request from PL/SQL?
    If not, how to do it using Java and encapsulate for PL/SQL?
    Please answer ASAP!!!

    It is pretty straight-forward to make HTTPS requests with UTL_HTTP.
    To do so, you first need to create an Oracle wallet on the database server host with Oracle Wallet Manager. If your database resides on Windows, I believe a short-cut has been created in the Windows menu. On Linux, it can be invoked from $ORACLE_HOME/bin/owm.
    Once the wallet is created, you need to make an additional call to utl_http.set_wallet(<wallet-directory>, <wallet-password>) before any utl_http.request or utl_http.begin_request calls. The <wallet-directory> is the wallet directory where you will find the cwallet.sso and/or ewallet.p12 files, using the format "file:/<wallet-directory>". For example:
    utl_http.set_wallet('file:/home/oracle/wallets/my_wallet/', '123456');
    When an Oracle wallet is created, it is pre-populated with common certificate authorities' certificates (e.g. Verisign). In the event that the server certificate of the HTTPS host is not signed by one of those common certificate authorities, you need to import the additional certificate authority's certificate in your wallet using Oracle Wallet Manager.

  • Error while using utl_http package

    Hi Guys,
    I need some help with the utl_http package
    The problem that Iam facing is as follows :
    Iam trying to use the Oracle provided package utl_http
    package to send an http request to a particular
    website.However Iam getting the request_failed
    exception.
    I type in the foll.command in sqlplus:
    select utl_http.request('http://www.oracle.com') from
    dual
    and I get the foll.error---
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "SYS.UTL_HTTP", line 174
    ORA-06512: at line 1
    If I try and trap the exception it shows
    request_failed exception.
    If any one has any clue on how to resolve this -- >please reply ASAP .
    Thanks

    Is it possible that your database sits behind a firewall? If so, you need to specify the proxy in utl_http.request.

  • ORA-29273: HTTP request failed ORA-12535: TNS:operation timed out

    SQL*Plus: Release 11.2.0.3.0
    Solaris 10 SPARC
    Hi,
    I get the following error when trying to make an HTTP request. Below is the snippet of code I run. I get the error after exactly 60 seconds(default timeout?). I searched through the forums and found many similar errors but nothing that helped me resolve this issue. The problem does not exist in the rest of our environments, only our test environment.
    Help is greatly appreciated. Thanks.
    DECLARE
       p_mid_tier    VARCHAR2 (500);
       responsestr   VARCHAR2 (500);
    BEGIN
       SELECT *****
         INTO p_mid_tier
         FROM *****
        WHERE profile_type = '*****';
       UTL_HTTP.set_wallet ('file://$ORACLE_HOME/network/admin/wallets');
       UTL_HTTP.set_transfer_timeout (6000);
       UTL_HTTP.set_response_error_check (TRUE);
       responsestr :=
          UTL_HTTP.request (
             UTL_URL.ESCAPE (p_mid_tier || '*****'));
       DBMS_OUTPUT.put_line (responsestr);
    END;
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1722
    ORA-12535: TNS:operation timed out
    ORA-06512: at line 15

    1001371 wrote:
    SQL*Plus: Release 11.2.0.3.0
    Solaris 10 SPARC
    Hi,
    I get the following error when trying to make an HTTP request. Below is the snippet of code I run. I get the error after exactly 60 seconds(default timeout?). I searched through the forums and found many similar errors but nothing that helped me resolve this issue. The problem does not exist in the rest of our environments, only our test environment.
    Help is greatly appreciated. Thanks.
    DECLARE 
       p_mid_tier    VARCHAR2 (500); 
       responsestr   VARCHAR2 (500); 
    BEGIN 
       SELECT ***** 
         INTO p_mid_tier 
         FROM ***** 
        WHERE profile_type = '*****'; 
       UTL_HTTP.set_wallet ('file://$ORACLE_HOME/network/admin/wallets'); 
       UTL_HTTP.set_transfer_timeout (6000); 
       UTL_HTTP.set_response_error_check (TRUE); 
       responsestr := 
          UTL_HTTP.request ( 
             UTL_URL.ESCAPE (p_mid_tier || '*****')); 
       DBMS_OUTPUT.put_line (responsestr); 
    END; 
    ORA-29273: HTTP request failed
    ORA-06512: at "SYS.UTL_HTTP", line 1722
    ORA-12535: TNS:operation timed out
    ORA-06512: at line 15
    the most frequent cause for TIMEOUT is a FireWall on or between client & server.
    when was last time this worked without error?
    what changed since then?

Maybe you are looking for