Problem in Using Utl_Http package

Hi to all,
I'm trying to send the sms(Short Message Service) using utl_Http package. When I'm trying to run a sql statement like
SELECT utl_http.request('http://www.oracle.com/index.html') FROM dual
I'm getting an error message like this.
The following error has occurred:
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
Pls help me to solve this problem.
Regards,
Alok Dubey

Thank you for ur reply. Infact my database was not able to access the internet. currently, it is working fine.
I'am using this code. It's works well.
CREATE OR REPLACE PROCEDURE Send_Sms_Http
AS
text_str VARCHAR2(5000);
V_Message VARCHAR2(200) := REPLACE('This is a DEMO SMS sent to u on '||TO_CHAR(SYSDATE,'DD/MM/RRRR HH12:MI:SS AM'),' ','%20');
text_sms VARCHAR2(5000) := 'http://hapi.smsapi.org/SendSMS.aspx?UserName=xxxx&password=xxxx&MobileNo=xxxx,xxxxx&SenderID=xxxx&CDMAHeader=xxxxx&Message='||V_Message;
BEGIN
text_str := utl_http.request(text_sms);
Dbms_Output.Put_Line('text_str = '||text_str);
EXCEPTION
WHEN OTHERS THEN
Dbms_Output.Put_line('Error in sending the message'||SQLERRM);
END;
Regards,
Alok Dubey

Similar Messages

  • Error while invoking webservice using UTL_HTTP package

    Hi All,
    I am invoking a webservice (SOAP Request) from a PL/SQL block using UTL_HTTP package.
    I am able to send the complete request and am getting the required instance on the BPEL Console, but the process is errorring out while getting response back.
    and the PL/SQL Block is ending in error mentioned below:
    ERROR at line 1:
    ORA-29266: end-of-body reached
    ORA-06512: at "SYS.UTL_HTTP", line 1321
    ORA-06512: at "APPS.CSM_BPEL_TEST_PKG", line 34
    ORA-06512: at line 1
    Can anyone let me know what is the cause of this.
    Thanks in advance

    My guess would be that your request is not properly constructed,
    29266, 00000, "end-of-body reached"
    // *Cause:  The end of the HTTP response body was reached.
    // *Action: If the end of the HTTP response is reached prematurely, check if
    //          the HTTP response terminates prematurely.  Otherwise, end the
    //          HTTP response.John

  • Can we post data 32KB using utl_http package?

    I was using utl_http package for posting http data. Now there is a change in requirement and I have to call a web service instead of normal http post. Also the amount of data to be transferred now is >32KB (previously it was only 16KB). I have to manaually create the SOAP message and post it as http requset. Is it possible to post data more than >32KB using the utl_http package?
    -Kumar
    Message was edited by:
    user586950

    did a trace route and this is what it came out with
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Moroni>ping 64.124.140.30:9090
    Ping request could not find host 64.124.140.30:9090. Please check the name and t
    ry again.
    C:\Documents and Settings\Moroni>tracert 64.124.140.30:9090
    Unable to resolve target system name 64.124.140.30:9090.
    C:\Documents and Settings\Moroni>tracert 64.124.140.30
    Tracing route to 64.124.140.30.mfnx.net [64.124.140.30]
    over a maximum of 30 hops:
    1 13 ms 15 ms 33 ms 73.91.188.1
    2 9 ms 11 ms 9 ms GE-2-45-ur01.troutdale.or.bverton.comcast.net [6
    8.87.218.185]
    3 * 12 ms * te-9-3-ar01.troutdale.or.bverton.comcast.net [68
    .87.216.89]
    4 39 ms 13 ms 16 ms 12.116.25.33
    5 17 ms 17 ms 18 ms tbr1011401.st6wa.ip.att.net [12.122.111.6]
    6 17 ms 15 ms 16 ms 12.122.86.41
    7 * * * Request timed out.
    8 * * * Request timed out.
    9 * * * Request timed out.
    10 * * * Request timed out.
    11 * * * Request timed out.
    12 * * * Request timed out.
    13 * * * Request timed out.
    14 * * * Request timed out.
    15 * * * Request timed out.
    16 * * * Request timed out.
    17 * * * Request timed out.
    18 * * * Request timed out.
    19 * * * Request timed out.
    20 * * * Request timed out.
    21 * *

  • Problem to use J2EE Packages in Forte 3.0 CE IDE

    I've got problems in using J2EE Packages in Forte for Java CE 3.0.
    I can't use these Packages with the Forte IDE!
    Example: import javax.jms.*;
    The Error: Can't find javax.jms.* Package
    What can I do to use the J2EE Package in the J2EE.jar?

    I post it so often, with a little bit different titles, cause the chance anybody helps looks better. Many People gave me so much help - but in so many different ways. So I changed the title of my Problem!
    I thank you for your support and help
    Bye

  • 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.

  • How to perform authentication on proxy using utl_http package?

    Hi,
    I am using Oracle 8i database (ver:8.1.7). I want to use the utl_http package to perform http requests. Within my company, I am forced to use a proxy and I have to be authenticated on that proxy. How can I authenticate myself on the proxy using utl_http.request function on Oracle 8i?
    Thanks a lot.
    Paulo.

    UTL_HTTP
    The UTL_HTTP package makes Hypertext Transfer Protocol (HTTP) callouts from SQL and PL/SQL. You can use it to access data on the Internet over HTTP.
    With UTL_HTTP, you can write PL/SQL programs that communicate with Web (HTTP) servers. UTL_HTTP also contains a function that can be used in SQL queries. The package also supports HTTP over the Secured Socket Layer protocol (SSL), also known as HTTPS, directly or through an HTTP proxy. Other Internet-related data-access protocols (such as the File Transfer Protocol (FTP) or the Gopher protocol) are also supported using an HTTP proxy server that supports those protocols.
    When the package fetches data from a Web site using HTTPS, it requires Oracle Wallet Manager to set up an Oracle wallet. Non-HTTPS fetches do not require an Oracle wallet.
    See Also:
    Chapter 102, "UTL_URL"
    Chapter 100, "UTL_SMTP"
    Oracle Advanced Security Administrator's Guide for more information on Wallet Manager
    This chapter discusses the following topics:
    UTL_HTTP Constants, Types and Flow
    UTL_HTTP Exceptions
    UTL_HTTP Examples
    Summary of UTL_HTTP Subprograms
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_http.htm#ARPLS070
    Joel P�rez

  • Getting ora-04030 out of process memory using utl_http package

    Hi,
    Using oracle db v9 on aix. I run an extract (pl/sql package) which processes about 50,000 records. When processing gets to about record 45,500 ora 04030 error is reported when calling utl_http.get response or utl_http.read_text. Only have this problem after about 45500 records prcoessed.
    Can anybody help?

    donl wrote:
    Hi,
    Using oracle db v9 on aix. I run an extract (pl/sql package) which processes about 50,000 records. When processing gets to about record 45,500 ora 04030 error is reported when calling utl_http.get response or utl_http.read_text. Only have this problem after about 45500 records prcoessed.
    Can anybody help?04030, 00000, "out of process memory when trying to allocate %s bytes (%s,%s)"
    // *Cause:  Operating system process private memory was exhausted.
    // *Action:
    [oracle@localhost ~]$

  • Problem in using UTL_FILE Package

    Dear Mates,
    I am trying to make use of UTL_FILE for inseting data in to the tables by reading the contents of a text file. I have set the UTL_FILE_DIR parameter by giving the path. Still i am not able to insert the records to the table.
    The error I am getting is
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "PRASANNA.LOADSTUDENTS", line 61
    ORA-06512: at line 1
    I have set the parameter UTL_FILE_DIR in INIT<SID>.ORA as
    UTL_FILE_DIR=C:\developer
    please help me out
    It will be helpful if you can mail me at [email protected]

    ORA-06512: at "PRASANNA.LOADSTUDENTS", line 61how looks like line 61 in your PRASANNA.LOADSTUDENTS function?
    what's happening there?
    From "Oracle Product Document Library":
    ORA-06512 at string line string
    Cause: Backtrace message as the stack is unwound by unhandled exceptions.
    Action: Fix the problem causing the exception or write an exception handler for this condition. Or you may need to contact your application administrator or database administrator.

  • DB Link problem when used in Package

    I have written the following code which works from sql window in TOAD
    SELECT ccs_cust_seq.nextval ccs_customer_no,
    SUBSTR(orig_system_reference,4,6) badge_code,
    'A' status,
    customer_id ora_cust_no,
    orig_system_reference,
    customer_name
    FROM suk_ccs_ra_customers@suk_ccs;
    suk_ccs is a database link
    when I put this code in a cursor in a package and compile I get the following error
    CURSOR cust_cur
    IS
    SELECT ccs_cust_seq.nextval ccs_customer_no,
    SUBSTR(orig_system_reference,4,6) badge_code,
    'A' status,
    customer_id ora_cust_no,
    orig_system_reference,
    customer_name
    FROM suk_ccs_ra_customers@suk_ccs;
    PL/SQL: ORA-04052: error occurred when looking up remote object user.SUK_CCS_RA_CUSTOMERS@db_link_name
    ORA-06553: PLS-215: String length constraints must be in range (1 ..32767
    this error happens to all cursors which use the database link
    Any help appreciated

    How is the definition of the table in the remote database? Does the error-message occure too, if you create a local view based on the remote table and use it in your cursor? Are there values larger then 32767 characters in a column of the remote table?
    In PL/SQL a varchar2 variable are able to store max. 32767 bytes.
    Anna

  • Problem while using Utl_mail Package.

    When i am trying to write file in local oracle server it works fine. But when i tried to write file in mapped or network drive system gives me a error message. I also want to write file in Client drive. How it would be possible.
    I got something for Mapped drive i am not able to implement successfully.
    The following example shows how this doesn't work, and in addition, shows how a directory can be remapped, without causing too much hassle to users who have existing procedures which write or read from the directory - unlike if a specific UTL_FILE_DIR is used. (But, remember, the procedures will go invalid when the directory is dropped - causing a recompile on next execute!)
    SQL> connect system
    Enter password: ******
    Connected.
    SQL> drop directory utl_file_dir;
    Directory dropped.
    SQL> create directory utl_file_dir as 's:\temp\norman\utl_file';
    Directory created.
    SQL> grant read,write on directory utl_file_dir to scott;
    Grant succeeded.
    SQL> connect scott/tiger
    Connected.
    SQL> execute empflatfile
    BEGIN empflatfile; END;
    ERROR at line 1:
    ORA-20001: utl_file.invalid_operation
    ORA-06512: at "SCOTT.EMPFLATFILE", line 19
    ORA-06512: at line 1
    So that didn't work - why not ?
    In control panel, services (NT) or control panel, administrative tools, services - stop the OracleServiceXXXX service. Click on the login tab, and note that it is using a local system logon. That user has no rights to any shares (at least on our NT system,) and so is unable to access the shared drives by their mapped name or full UNC name.
    If I change the service to logon as my own username and restart it, I can try again :
    SQL> connect scott/tiger
    Connected.
    SQL> execute empflatfile
    PL/SQL procedure successfully completed.
    I could also go back and change the directory to use a mapped drive name (S:\temp\norman\utl_file) but if our sysadmins for NT decided to change the share name, or the mapped drive, the procedure would be broken again. It is advisable to use the full UNC name for the drive you are trying to access.
    And finally, watch out for the times when you change your Windows password. When you do this, remember to amend your OracleServiceXXXX service again - otherwise the database won't startup.
    It's not possible to start and stop database again and again. How can i gives all rights to current user to do this task.

    Wason Naveen wrote:
    It's not possible to start and stop database again and again. How can i gives all rights to current user to do this task.You don't.. as it is IMO a serious security violation to attempt what you are doing.
    The correct method is to have the client "+save+" the file it receives from the server - not for the server to write directly to the client's drive.
    Using a web-based architecture, this is quite easy - the web browser makes a standard HTTP call (via a web server) to a PL/SQL procedure and it streams the file (using standard HTTP) to the browser. The web user now has the options to save or open the file (depending on the Mime type specified by the PL/SQL procedure and mapping of that type in the client's browser).
    From a security, robustness, performance and scalability points of view.. I (wearing either DBA or sysadmin cap) would refuse to implement PL/SQL code on a server instance that writes directly to a client drive.

  • Problem escaping '&' character in utl_http package..

    I'm using utl_http package to download web pages without any problem if the URL is a regular one such as: http://www.oracle.com/etc/data.html
    However, as in most cases, the data files are dynamically generated by cgi's, and look like:
    http://xyz.data.com/cgi?n1=v1&n2=v2
    Whenever I pass the above as a URL, Oracle thinks that I'm trying to pass a value to the variable d on the fly.
    Escaping & with \ or {} did not help at all.
    Does anybody have any suggestions?
    Thanks
    Cuneyt
    [email protected]

    hi,
    try using " set scan off "
    regards,
    shravan

  • Using UTL_HTTP

    Hi ...
    I am using oracle 9i release 2 ....
    I want to use UTL_HTTP package to POST the Data ....
    Can Anyone Plz give me the hint of how to use it .....
    I am also worried abt testing the above problem ... Is there anything on Internet to Test the Posting of DATA using UTL_HTTP ....
    Thanks,

    Hi,
    Did you see this sample code below ?
    http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Utl_Http_Package_Enhancements/Cr_Using_Utl_Http.htm
    Cheers

  • Downloading of PPT using UTL_HTTP

    Hi All,
    I want one solution such a way that we have some urls stored in our database, so we are going to retrive the data that are in ppt format from this urls and store it in the ppt format in our database and my problem is the urls are password protected thats why when we use utl_http package we are getting blank ppt getting saved. So i want a solution as to how can we authenticate in the process ,while retrieving data from url.Can anybody please help me.
    Thanks
    Edited by: dil84 on Jan 19, 2009 11:45 PM

    Hello,
    Take a look at the following thread -
    Re: UTL_HTTP.REQUEST_PIECES on a page that needs log in
    Hope this helps,
    John
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Error while invoking webservice using UTL_HTTP from PL/SQL Block

    Hi All,
    I am invoking a webservice (SOAP Request) from a PL/SQL block using UTL_HTTP package.
    I am able to send the complete request and am getting the required instance on the BPEL Console, but the process is erroring out while getting response back.
    and the PL/SQL Block is ending in error mentioned below:
    ERROR at line 1:
    ORA-29266: end-of-body reached
    ORA-06512: at "SYS.UTL_HTTP", line 1321
    ORA-06512: at "APPS.CSM_BPEL_TEST_PKG", line 34
    ORA-06512: at line 1
    Package is completing successfully if i test in local DB and local BPEL.
    But giving above error in client's.
    Can anyone let me know what is the cause of this.
    Thanks in advance

    I got it working by making process Synchronous.
    But with asynchronous process it is still same error.
    Thanks...

  • Error messages when using InCopy packages

    I have an editor who travels a lot, and is having consistant problems with using the packaging workflow in InCopy. I believe some of his problems are human error - but don't have the technical reasons for the error messages. There have also been some error messages received by the artists when they get the package back and try to update the ID file.
    We are using CS4 and macs with snowleopard OSs.
    Can someone please help to explain what these errors mean below?
    1. InCopy User - when opening the icml file (after first opening the package. Going back to the icml doc for more editing)
    " "" could not be found. Do you want to postpone its recovery?
    Click YES to recover this document later
    Click NO to delete recovery data for this document
    Click Cancel to postpone all document recovery til later"
    2. InCopy user - when trying to package email back to InDesign user
    "This assignment includes missing or modified links. Low resolution versions will be used for the missing items, and the most recently saved versions will be used for modified links. Continue packaging?"
    3. InCopy user - when packaging to send to InDesign user by email
    "An error message occured when sending this email"
    (and then the package was not attached to the email)
    - this is recurring often with only one InCopy user
    4. InDesign user received the package back and when they tried to open it, an error message said that the assignments couldn't be found and the file wouldn't open. The file name hadnt been changed and we could find no reason why the package wouldn't open. (sorry, the artist didn't screenshot the actual message for this one).
    Any help would be a great help - and stop a mutiny by my editors!

    Error message 1 appears when InCopy or InDesign reopens for the first time after a crash. It's try to recover the documents that were open when the program crashed. We often get this error message if files are located on the server and we're not connected, but it could also happen if a file has been moved from it's original location. Whether or not you need to recover the file would drive your response.
    Error 2: It sounds like the InCopy package either does not include links or the linked files have been moved or modified since opening the package. If you can relink images after files come back, it's probably OK for them to proceed with packaging. Personally, I uncheck the box that includes images when creating an assignment. The editor will still be able to see greyed out previews of the images, they just won't be available for editing. This also makes package files a lot smaller.
    Error 3: This could be a problem with the user's default email client. Instead of having them choose Return for InDesign and Email," have them choose "Return for InDesign" and save it to their desktop. They can then attach the package to the outgoing email manually.
    Error 4: Sorry, but I have no idea!
    Best of luck,
    Matthew

Maybe you are looking for