Sql to retrieve XML from a website

i am using the following stmt in a plsql package/procedure to retrieve a xml from a url
select sys.xmltype.createXML(u.myurl.getClob()) from store_url u
(and the table definition is -
create TABLE store_url
  myurl_name VARCHAR2(100),
  myurl SYS.URIType
)  and has 1 row w the url in the myurl column
this correctly returns the xml for few days (scheduled daily) and then suddenly every once in awhile instead of returning the XML returns the following.....
<html><body><script>document.cookie='aaaaaaa=21d6db3faaaaaaa_21d6db3f; path=/';window.location.href=window.location.href;</script></body></html>
sometimes it does that for a day, other times for couple days and then resets itself (no code change) and starts pulling the XML again.....
anyone ever suffered this torture ?
TIA.

From similar 10.2 documentation (the first I hit upon)
"Cookie support is enabled by default for all HTTP requests in a database user session"
UTL_HTTP
I just picked this version as common as did not know your version.
You should not need to do anything with a cookie when making the initial request as they are the ones that send the cookie to you for further interactions during that session.  Upon the initial request, they send a cookie back to you as part of the response.  At least that is my understanding of it.
That is why I said you will be better support over at the PL/SQL forum for this type of UTL_HTTP question.

Similar Messages

  • How to retrieve data from other websites?

    Hi all,
    Don't know if anyone can point me in the right direction.
    How can I retrieve or fetch data from other website&rsquo;s (*Database*) ?
    I&rsquo;m trying to build a web application that would retrieve and fetch data from other website&rsquo;s (Database) like the www.comparethemarket.com.
    The data I&rsquo;m trying to fetch it is in database, in my opinion I think I have to make a http web request then send parameters, then get the result. I could not find any tutorials
    on the web,
    Thank you.

    Fahad_24 wrote:
    Hi all,
    Don't know if anyone can point me in the right direction.
    How can I retrieve or fetch data from other website&rsquo;s (*Database*) ?
    I&rsquo;m trying to build a web application that would retrieve and fetch data from other website&rsquo;s (Database) like the www.comparethemarket.com.
    The data I&rsquo;m trying to fetch it is in database, in my opinion I think I have to make a http web request then send parameters, then get the result. I could not find any tutorials
    on the web,
    Thank you.Unless the website provides an interface to their data, you are most likely not even allowed to do this. There is only one way to find out: contact them and ask about it or look around their website if their is a manual that describes how to do it. If there is such an interface, it will usually be some kind of web service (such as a SOAP interface).

  • Java.sql : Cannot retrieve records from Oracle 9i with JDK 1.5

    I think I'm doing everything right, but still the following code does not
    return any rows. I have the classpath set correctly and ojdbc14.jar in
    the path. I'm using jdk 1.5.     
    What am I missing? Any help greatly appreciated. Thanks!
         Connection conn = null;
         String serverName = "MySvr";
         String portNumber = "1521";
         String sid = "mySID";
         String myURL = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid;
         logger.writeLog("URL: " + myURL);
         String username = "scott";
         String password = "tiger";
         String query = "select 'test' from dual";
         DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
         conn = DriverManager.getConnection(myURL, username, password);
         Statement stmt = conn.createStatement();
         rs = stmt.executeQuery(query);
         logger.writeLog("Cur Row : " + rs.getRow());
    -----> returns 0
         while (rs.next()) {
    ------> throws java.lang.NullPointerException
         }

    I think I'm doing everything right, but still the following code does not
    return any rows. JDBC didn't change from 1.4 to 1.5, so that's a red herring. It's you, not the JVM.
    I have the classpath set correctly Really? A system CLASSPATH environment variable? I'd say that's wrong. Better to use the -classpath option on javac.exe when you compile and java.exe when you run.
    and ojdbc14.jar in the path. You'd better mean CLASSPATH and not PATH. CLASSPATH is for the Java class loader; PATH is for the operating system. Don't get the two confused.
    I'm using jdk 1.5.     Irrelevant here.
    What am I missing? Any help greatly appreciated. Thanks!I think you're using ResultSet incorrectly, because it's never null.
    Try this:
    // I'd externalize this so you could change it on the fly.
    String driver = "oracle.jdbc.driver.OracleDriver";
    String url = "jdbc:oracle:thin:@MySvr:1521:mySID";
    // I hope you're not using the default username and password for real
    String username = "scott"; 
    String password = "tiger";
    logger.writeLog("URL: " + url);
    Connection conn = null;
    Statement stmt = null;
    ResultSet rs = null;
    try
        Class.forName(driver);
        conn = DriverManager.getConnection(url, username, password);
        String sql = "select 1 from dual";
        stmt = conn.createStatement();
        rs   = stmt.executeQuery(sql);
        int value;
        while (rs.next())
            value = rs.getInt(1);
    catch (SQLException e)
        e.printStackTrace();
    finally
        // I'd put all these in a utility class
        try { if (rs != null) rs.close(); } catch (SQLException e) { logger.writeLog("could not close result set"); }
        try { if (stmt != null) stmt.close(); } catch (SQLException e) { logger.writeLog("could not close statement"); }
        try { if (conn != null) conn.close(); } catch (SQLException e) { logger.writeLog("could not close connection"); }
    }Note: close your resources in a finally block. It's important, especially if you don't want to run out of Oracle cursors.
    %

  • Sql syntax to retrieve xml

    Hi:
    I have a table ASSAYS as:
    ASSAY_NAME VARCHAR2(30)
    ASSAY SYS.XMLTYP(...)
    What is sql syntax to retrieve xml from assay as XMLType object in Java?
    Thanks!

    Get xml from xdb from java

  • How to modify select query for retrieve assets from assets tab and assets in merchandising in 10.1.2?

    Hi All,
          I need to modify the SQL for retrieving assets from assets tab and assets in merchandising in 10.1.2. I found the class for SQLQuery builder, but I want to change the SQL.
          Could you anyone please how to solve this.
    Thanks & Regards,
    Bala

    Hi All,
          I need to modify the SQL for retrieving assets from assets tab and assets in merchandising in 10.1.2. I found the class for SQLQuery builder, but I want to change the SQL.
          Could you anyone please how to solve this.
    Thanks & Regards,
    Bala

  • Retrieve information from internet into Lookout

    Is there any way to retrieve data from a website into a Lookout object?
    For example there are websites that post tables of data, presuming that
    I would have the appropriate information (url, field, etc), I would
    like to read some of this data into one or more Lookout objects, such
    as an expression. If not, is there an alternative solution, such as
    retrieving the data into another program, and using DDE or some other
    path to get the data into Lookout? Any suggestion would be appreciated.

    Fadi,
    You should be able to use the DataSocket Object for this.  Please see the following post by yours truly  : 
    http://forums.ni.com/ni/board/message?board.id=190&message.id=1176
    You will use 'HTTP' instead of the 'file,' obviously.  You will very likely (I didn't test this) get raw source for the web page (HTML/script, etc.). 
    Alternatively, and theoretically at least, you should be able to use the IE ActiveX Control as well. 
    Hope this gives you some ideas. 
    -Khalid

  • "Error retrieving xml file from database"

    Hello All,
    I have installed and configured planning with Shared services. While I try to create an instance in Configuration Utility by entering the Instance Name, Host Name, Port (8300) and Click "Next", I get this error -
    *"System failure:Error retrieving xml file from database".*
    My RDBMS is - SQL Server 2005
    OS - Windows 2003 Server
    I am unable to work on planning for few months due to this error.. I would sincerely appreciate if someone can provide me a solution for this..
    Thanks much,
    Varma.

    Hi,
    Ive seen this before.
    If this is a new environment could you create a blank database and configure it as your System database? Then try again and you should be fine.
    I think you may have some invalid entries in your sys database.
    Seb
    www.taysols.com.au

  • Product Instance Registration Error Message: "System Failure: Error while retrieving xml file from database"

    Hi Planning installation Gurus,
    Did u get any luck to resolve this problem as i am also facing same problem "Error creating instance" during install of Planning 9.3.1. i tried 30-50 times reconfiguration every time same problem..
    OS: Vista Premium
    SQL Server 2005
    Essbase:9.3.1
    Error Message: "System Failure: Error while retrieving xml file from database"
    Details of error:::::::::::::::::::::::::
    at com.hyperion.planning.event.HspSysExtChangeHandler.run(Unknown Source
    Can not get JDBC connection for SYS external changed actions.
    Can not get JDBC connection.
    java.lang.NullPointerException
    at com.hyperion.planning.sql.HspSQLImpl.getConnection(Unknown Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.actionPoller(Unkno
    wn Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.run(Unknown Source
    Can not get JDBC connection for SYS external changed actions.
    Can not get JDBC connection.
    java.lang.NullPointerException
    at com.hyperion.planning.sql.HspSQLImpl.getConnection(Unknown Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.actionPoller(Unkno
    wn Source)
    at com.hyperion.planning.event.HspSysExtChangeHandler.run(Unknown Source
    Can not get JDBC connection for SYS external changed actions.
    Can not get JDBC connection.
    Pls provide Solution

    Hi John,
    though i am trying with SQl server authentication with different user but still status is same of planningSystemDB.properties
    SYSTEM_DB_DRIVER=hyperion.jdbc.sqlserver.SQLServerDriver
    SYSTEM_DB_URL=jdbc:hyperion:sqlserver://neeraj-PC:1433
    SYSTEM_DB_USER=windowsAuthentication
    SYSTEM_DB_PASSWORD=CAFBAEFNBGEAABHEDOADFKADACBGBIFHBLCDFBAFFH
    SYSTEM_DB_CATALOG=plandb
    SYSTEM_DB_TYPE=SQL
    INSTANCE=
    my steps:
    Using SQL Server Management Studio
    Changed Widows authentication to SQL server authentication mode
    In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
    On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
    In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
    In SQL Server Management Studio Object Explorer, right-click the server, and then click Properties.
    On the Security page, under Server authentication, select the new server authentication mode, and then click OK.
    In the SQL Server Management Studio dialog box, click OK to acknowledge the requirement to restart SQL Server.
    To restart SQL Server from SQL Server Management Studio
    To enable the sa login by using Management Studio
    In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.
    On the General page, you might have to create and confirm a password for the sa login.
    On the Status page, in the Login section, click Enabled, and then click OK.
    In Object Explorer, expand Security, expand Logins, right-click sa, and then click Properties.
    On the General page, you might have to create and confirm a password for the sa login.
    On the Status page, in the Login section, click Enabled, and then click OK.}}}
    anything else should i change.................

  • Product Instance Registration Error: "System Failure: Error while retrieving xml file from database"

    Hi S9 installation Gurus,
    Please try to resolve this long awaited issue with Planning installation as this is purely configuration related issue.
    Detail of Problem:-
    After Susessful configuration of
    1) Foundation Services (Hyperion Shared Services)
    2) Essbase administration services
    3) Essbase Server
    4) Hyperion reporting and analysis
    5) Planning -----> Product options, Register with shared services, configure database, deploy to application server (Appache)
    Error Point: when i tick ckeck box in front of Product instance registration
    click next
    create instance
    click next
    instance name-Plan1
    Web tier host name: my machine name (neeraj-pc, as i installed locally all component of hyperion)
    server port: 8300 (system suggesting)
    tick on active instance
    click next
    Error Pop Up "System Failure: Error while retrieving xml file from database"
    Details of PlanningSystemDB (file :- \Hyperion\common\config\PlanningSystemDB.properties)
    SYSTEM_DB_DRIVER=hyperion.jdbc.sqlserver.SQLServerDriver
    SYSTEM_DB_URL=jdbc:hyperion:sqlserver://neeraj-PC:1433
    SYSTEM_DB_USER=puser
    SYSTEM_DB_PASSWORD=GGAKFJ
    SYSTEM_DB_CATALOG=p1db
    SYSTEM_DB_TYPE=SQL
    INSTANCE=
    Note: puser (SQL Authenticated user)
    Thanks
    Kumar
    Edited by: user10385300 on Dec 4, 2008 5:44 AM

    This has been resolved at :- Product Instance Registration Error Message: "System Failure: Error while retrieving xml file from database"
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to retrieve elements from 3 different xml file in one url

    Hi all,
    Could anyone please let me how can we retrieve elements from 3 different xml file in one url?
    i just can only do it with one file only, any help would very appreciate.
    Thank in advance
    Jim

    Hi Philip
    Thanks for replying me.
    I tried on that way, In my mdx query i am using one slice attribute (i.e [Customer].[Gender].allmembers) in rows so getting error "The  Hierarchy already appears in Axis1".
    SELECT
    {[Measures].[Internet Sales Amount] } ON 0,
    NON EMPTY
    {[Customer].[Gender].allmembers } ON 1 -- Used
    FROM
    [Adventure Works]
    WHERE
    [Customer].[Gender].&[M]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].&[XL]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].&[Australia]
    Can you provide alternate ways to get resolved.
    Thanks in advance

  • Generating an xml from a pl/sql procedure

    Hi Friends,
    I have come up with a requirement to generate an xml from a pl/sql procedure.
    I did some R & D and also got some sample procedures but could not understand the datatypes being used.
    The procedure declares variables like this:
    doc                  xmldom.DOMDocument;
    mainNode         xmldom.DOMNode;
    headerElem      xmldom.DOMElement; Pls could anyone tell what do these xmldom.DOMDocument, xmldom.DOMNode and xmldom.DOMElement mean?
    Later in the procedure, these variables are assigned values like
    doc      := xmldom.newDOMDocument;
    mainNode := xmldom.makenode(doc); This went a bouncer on me.
    Pls help.
    Thanks in advance ...!

    You can check this one -- Learned this from michael.
    satyaki>
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    satyaki>
    satyaki>
    satyaki>with person_h
      2  as
      3    (
      4      select 1 id, 'M' gender, 'W' race, '170' weight from dual union all
      5      select 1, 'M', 'W', '170' from dual union all
      6      select 1, 'M', 'W', '180' from dual union all
      7      select 1, 'M', NULL, '175' from dual union all
      8      select 1, NULL, 'W', NULL from dual
      9    )
    10    select xmlelement("Person",(
    11                                 select xmlagg(xmlelement("Sex", gender))
    12                                 from (
    13                                        select distinct gender
    14                                        from person_h
    15                                        where id = 1
    16                                        and gender is not null
    17                                      ) pg
    18                                ),
    19                                (
    20                                  select xmlagg(xmlforest(race as "Race"))
    21                                  from (
    22                                         select distinct race
    23                                         from person_h
    24                                         where id = 1
    25                                       ) pg
    26                                ),
    27                                (
    28                                  select xmlagg(xmlforest(weight as "Weight"))
    29                                  from (
    30                                         select distinct weight
    31                                         from person_h
    32                                         where id = 1
    33                                       ) pg
    34                                 )
    35                     ).getstringval() Res
    36    from dual;
    RES
    <Person><Sex>M</Sex><Race>W</Race><Weight>170</Weight><Weight>175</Weight><Weight>180</Weight></Person>
    satyaki>Regards.
    Satyaki De.

  • How to generate XML from SQL query

    possible ways to generate XML from SQL qury.
    i want to generate XML of following query. "Select * from emp,dep wher emp.deptno=dept.deptno"

    Hello.
    Can you try:
    SQL> set pages 0
    SQL> set linesize 150
    SQL> set long 9999999
    SQL> set head off
    SQL> select dbms_xmlgen.getxml('Select * from emp,dep wher emp.deptno=dept.deptno') from dual;
    It works fine for me.
    Octavio

  • How to retrieve value from xml file

    hi all,
    can somebody pls tell me how to retrieve value from xml file using SAXParser.
    I want to retrieve value of only one tag and have to perform some validation with that value.
    it's urgent .
    pls help me out
    thnx in adv.
    ritu

    hi shanu,
    the pbm is solved, now i m able to access XXX no. in action class & i m able to validate it. The only thing which i want to know is it ok to declare static ArrayList as i have done in this code. i mean will it affect the performance or functionality of the system.
    pls have a look at the following code snippet.
    public class XMLValidator {
    static ArrayList strXXX = new ArrayList();
    public void validate(){
    factory.setValidating(true);
    parser = factory.newSAXParser();
    //all factory code is here only
    parser.parse(xmlURI, new XMLErrorHandler());     
    public void setXXX(String pstrXXX){          
    strUpn.add(pstrXXX);
    public ArrayList getXXX(){
    return strXXX;
    class XMLErrorHandler extends DefaultHandler {
    String tagName = "";
    String tagValue = "";
    String applicationRefNo = "";
    String XXXValue ="";
    String XXXNo = "";          
    XMLValidator objXmlValidator = new XMLValidator();
    public void startElement(String uri, String name, String qName, Attributes atts) {
    tagName = qName;
    public void characters(char ch[], int start, int length) {
    if ("Reference".equals(tagName)) {
    tagValue = new String(ch, start, length).trim();
    if (tagValue.length() > 0) {
    RefNo = new String(ch, start, length);
    if ("XXX".equals(tagName)) {
    XXXValue = new String(ch, start, length).trim();
    if (XXXValue.length() > 0) {
    XXXNo = new String(ch, start, length);
    public void endElement(String uri, String localName, String qName) throws SAXException {                    
    if(qName.equalsIgnoreCase("XXX")) {     
    objXmlValidator.setXXX(XXXNo);
    thnx & Regards,
    ritu

  • MS SQL database needs to run mdx query to analysis services to retrieve data from a BPC 10 Netweaver cube(view only)

    We are in the process of migrating from BPC7 SP12 Microsoft sql server to BPC10 netweaver on a sql server with BW7.4 and need to integrate our home grown data warehouse which is on a Microsoft sql server.  The data warehouse currently connects to BPC7 using integration services/analysis services and runs mdx queries to analysis services to retrieve data from the BPC7 cube (view only).  Please provide documentation on how to create this same integration with our data warehouse using BPC10 netweaver on a sql server.

    When you were setting up your ODBC data source for
    the Text driver, did you click on the "Options"
    button? There's a lot of options in there that I
    didn't understand at first glance.Yes I clicked on the options button, but the only thing there is dealing with file extensions. I left it set to the default.
    I have since tried closing my connection after I insert a record, I then try executeQuery, but still no luck. Seems strange that I can write to the file but not read from it. If any thing I'd expect the opposite problem.
    I have also tried using the class "JoltReport" from the sun tutorial instead of my own with the same result.
    Message was edited by:
    Hentay

  • Retrieving data from TCP/IP in xml and displaying values?

    Hey, I am using a program to retrieve data from a machine and outputting it in xml to the localhost.  On a seperate computer, I am trying to create a client application to read the xml data from that IP host and just output the important values instead of the whole script.  I am new to Labview and programming, has anyone written a program similar to what I am trying to accomplish?  I searched for it but couldn't quite find what I was looking for.  I really could use some help with trying to figure this out and appreciate any help or advice you could give me.   

    Where did you search? There are examples that ship with LabVIEW that show you how to do client-server applications using TCP/IP. Did you try those? You would need to add the parsing of the data you receive (i.e., the XML).

Maybe you are looking for

  • Unable to capture image using MDT 2012

    After running my Sysprep and Capture task using MDT 2012, MDT begins to capture the image and makes it all the way to ~94% and then stops and returns several errors. Any idea as to what may be causing this? Below are the errors returned during the ca

  • Windows does not recognise nokia 3500 connected wi...

    Generally I use my phone as a modem . As I didn't have a usb cable I used bluetooth to connect my phone. I tried to upgrade my phone's software using it's onboard software updater it says "no update found" though my phone's software version is 5.51 .

  • Re-Install Photoshop 9

    How do I re-install my Photoshop 9 on my repaired and upgraded computer, as the software says my installation quota is used?

  • Report listing for roles

    Hi everybody, I am trying to find a way to get a list of all roles in BW/SEM environment and to see what reports are assigned to these individual roles. There's quite a bunch of them so I hope there's a way to do this more conveniently? Thanks in adv

  • Where did my Time Machine backed up files go?

    I frequently back up my MacBook Pro to an external hard drive using Time Machine. When I am no longer using files I've backed up I delete them from my MacBook Pro and leave them on the backup disk in case I need them later on. The last time I backed