How to read a xml file created dynamically and use it to to chart

Hi
I am using Fuisonchart in Flex to create 3D charts i have stored my xml in server path as "Data.xml",this xml will be generated when i click on a button,this button passes my http service and frame my xml.
Xml values will get changed as per database values, my problem is my chart fetches xml of old generated values,and not the newly updated xml values,
I need to send my xml atonce when it is updated and changed,Flex part gets that updated value only when i run the application second time.
So please help me to update the chart atonce when it is updated.
Thanks in Advance
Gopinath.A,
Softrware Developer
Chennai.

on button click, call sendGenerateService().
private function sendGenerateService():void
var hs:HTTPService = new HTTPService();
hs.url = "generateXML.php?random="+Math.random();//generateXML.php will do necessavry stuff to update Data.xml
hs.method = "post";
hs.addEventListener(FaultEvent.FAULT,fault);
hs.addEventListener(ResultEvent.RESULT,resultGenerateService);
hs.send();
private function resultGenerateService(e:ResultEvent):void
var hs:HTTPService = new HTTPService();
hs.url = "Data.xml?random="+Math.random();
hs.method = "post";
hs.addEventListener(FaultEvent.FAULT,fault);
hs.addEventListener(ResultEvent.RESULT,resultGetXml);
hs.send();
private function resultGetXml(e:ResultEvent):void
// feed your chart with result
private function fault():void
//fault handler

Similar Messages

  • How to read an xml file from headers

    Hi ,
    I am not getting how to read an xml file sent by client device in header to server.
    Thankx.

    There is a getHeader() in HttpServletRequest interface
    String locationURL=request.getHeader("Location");If URL of your file was set in Location attribute of header.
    Edited by: ngpgeeta on Dec 19, 2008 8:03 AM

  • How to read an xml file in OSB using file protocol where reading file path is dynamic.

    HI,
    We have to read a xml file from a location and write into Db.
    Here reading file location is dynamic .
    Please suggest

    Hi
    With open dataset you can open any file on the application server. So it should be working, but maybe you are looking for:
    CALL TRANSFORMATION my_transformation
           SOURCE  XML xml_string
           RESULT  ROOT1 = field1
                   ROOT2 = field2.
    Best regards,
    Guido Koopmann

  • How to read a xml file in ActionScript

    In mxml we can find <mx:Model> to load a xml and using
    it easily. But in ActionScript, there is no such a Class about this
    function(only implemented in mxml), so how to load a xml file in a
    easy way in ActionScript?
    And I tried using HTTPService, but I think that is not the
    best solution because the code do not know when the hander get the
    data in xml then the function return that value.
    So please someone give a easy way as <mx:model> in mxml
    to read the xml file?
    Thank you very much.

    Flex is asynchronous so HTTPService with result event handler
    is the way to go.

  • How to read an xml file on the server?

    Hi all,
    we need to read an XML file which will be on the appplication server (visible using the transaction AL11).
    We will use the transaction CG3Z in order to upload the file to the server.
    When we try to open it using the instruction OPEN DATASET we have a dump. Which way must we use to open an xml file in this case?
    Thanks for your help.
    David

    Hi
    With open dataset you can open any file on the application server. So it should be working, but maybe you are looking for:
    CALL TRANSFORMATION my_transformation
           SOURCE  XML xml_string
           RESULT  ROOT1 = field1
                   ROOT2 = field2.
    Best regards,
    Guido Koopmann

  • How to get the XML file if we are using the Product short name.

    Hi,
    Till now I have used Short name of the Concurrent Program for Code while creating a Data Definition. Now saw a seeded template which has given the Code by Product short name. If we have the concurrent program then it is easy to refer the fields by checking the XML file. In this case how to find the XML file or how to refer all the fields if we have given code with Product short name. I saw this for iReceivables(ARI). Anybody please help me.
    Thanks.

    Hi Siva
    Just to clarify, rather than the short name of the conc program there is a shipped data definition that just uses the product short name? What is the data def so I can check it.
    Regards, Tim

  • Read in xml file in JPD and store

    I want to read in xml file in to jpd. I want to use xml file as properties file. and access it using xmlbeans. What is good method to this . I do not want to load file every time jpd is called.
    Message was edited by:
    rsg8
    Thanks all . I was able to handle this.

    IN the time since i posted i have solved my own query!

  • How to read a XML file from BLOB column and insert in a table - PL/SQL Only

    Hi,
    To make data load more simple to end user instead placing file on the server and use SQL-LOADER, I came up with new idea that using oracle ebusiness suite attachment functionality. that loads a XML file from local PC to a database column(table is fnd_attachments, default data type is BLOB over here).
    I tried with DBMS_LOB and didnt get around.
    Please can anyone tell me how to read the BLOB column using PL/SQL and store the data in a oracle table. Here's the sample XML file and table structure FYI.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Corporate_alloc.xsd" generated="2009-07-07T14:17:49">
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080543758</DET_CODE>
    <DET_NAME>Waves, Tides and Shallow-Water Processes</DET_NAME>
    <ALLOCATION_RATIO>0.000041</ALLOCATION_RATIO>
    </Corporate_alloc>
    <Corporate_alloc>
    <PKG_CODE>BKCORP</PKG_CODE>
    <PKG_NAME>Corporate Edition - Books</PKG_NAME>
    <DET_CODE>B9780080534343</DET_CODE>
    <DET_NAME>Hydrostatically Loaded Structures</DET_NAME>
    <ALLOCATION_RATIO>0.000127</ALLOCATION_RATIO>
    </Corporate_alloc>
    </dataroot>
    CREATE TABLE TEST_XML
    ( PKG_CODE VARCHAR2(50),
    PKG_NAME VARCHAR2(100),
    DET_CODE VARCHAR2(20),
    DET_NAME VARCHAR2(500),
    ALLOCATION_RATIO NUMBER )
    Thanks
    EBV

    In regards to #3, use the COLUMNS functionality of XMLTable instead of using Extract. Two simple examples are
    Re: XML Data - Caliculate fields
    Re: Extractvalue function not recognised

  • How to read an XML file into a java program?

    hi,
    i want to load the following very simple xml file in my java program.
    <root>
    <weblogic>
    <url value="t3://192.168.1.160:7001" />
    <context value="weblogic.jndi.WLInitialContextFactory" />
    </weblogic>
    </root>
    I am getting the error: " Line=1: cvc-elt.1: Cannot find the declaration of element 'root'."
    What might be the problem can anyone help me out.
    My java class code is:
    public class BIXMLReader {
    /** All output will use this encoding */
    static final String outputEncoding = "UTF-8";
    // Parses an XML file and returns a DOM document.
    // If validating is true, the contents is validated against the DTD
    // specified in the file.
    public static Document parseXmlFile(String filename, boolean validating) {
    try {
    // Create a builder factory
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    factory.setIgnoringComments(false);
    factory.setIgnoringElementContentWhitespace(false);
    factory.setCoalescing(false);
    factory.setValidating(validating);
    // Create the builder and parse the file
    System.out.println("filename = " + filename);
    DocumentBuilder db = factory.newDocumentBuilder();
    // Set an ErrorHandler before parsing
    OutputStreamWriter errorWriter = new OutputStreamWriter(System.err, outputEncoding);
    db.setErrorHandler(new MyErrorHandler(new PrintWriter(errorWriter, true)));
    Document doc = db.parse(new File(filename));
    System.out.println(doc.toString());
    return doc;
    } catch (SAXException e) {
    System.out.println("A parsing error occurred; the xml input is not valid. " + e.getMessage());
    } catch (ParserConfigurationException e) {
    System.out.println("Parser configuration exception has occured");
    } catch (IOException e) {
    System.out.println("IO Exception has occured " + e.getMessage());
    return null;
    // Error handler to report errors and warnings
    private static class MyErrorHandler implements ErrorHandler {
    /** Error handler output goes here */
    private PrintWriter out;
    MyErrorHandler(PrintWriter out) {
    this.out = out;
    * Returns a string describing parse exception details
    private String getParseExceptionInfo(SAXParseException spe) {
    String systemId = spe.getSystemId();
    if (systemId == null) {
    systemId = "null";
    String info = "URI=" + systemId +
    " Line=" + spe.getLineNumber() +
    ": " + spe.getMessage();
    return info;
    // The following methods are standard SAX ErrorHandler methods.
    // See SAX documentation for more info.
    public void warning(SAXParseException spe) throws SAXException {
    out.println("Warning: " + getParseExceptionInfo(spe));
    public void error(SAXParseException spe) throws SAXException {
    String message = "Error: " + getParseExceptionInfo(spe);
    throw new SAXException(message);
    public void fatalError(SAXParseException spe) throws SAXException {
    String message = "Fatal Error: " + getParseExceptionInfo(spe);
    throw new SAXException(message);
    }

    ok thanks, i can get the elements, but why did it not validate it?
    I want to read the child nodes of "weblogic" not by their name but by their index. Because i dont want to confine the reader so i want to read all the child nodes of weblogic (looping over them). i m doing the following but its not returning me the correct result and giving me the wrong count of child nodes.
    Element elementNode = (Element)doc.getElementsByTagName("weblogic").item(0);
    NodeList nodeList = elementNode.getChildNodes();
    int length = nodeList.getLength();
    System.out.println("length = "+ length); // the length its giving is 5 but i shuld get only 2
    for(int i=0; i < length; i++) {
    Element elmChild = (Element) nodeList.item(i);
    System.out.println(elmChild.getAttribute("value"));
    what might be the problem?

  • How will read the property file on dynamically?

    hi,
    I developed 2 java files...in both the files i am reading the some content from .property file(Notes.properties)....
    I created the jar file call Aix.jar using the following command.
    jar -cvf Aix.jar *.class(without specifying the notes.properties file)...
    then i executed the java file using the folowing command
    java -cp Notes.jar;Aix.jar NotesToolTest
    now i am getting following exception:
    Exception in thread "main" java.lang.ExceptionInInitializerError
    Caused by: java.util.MissingResourceException: Can't find bundle for base name Notes, locale en_US
    at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
    at java.util.ResourceBundle.getBundleImpl(Unknown Source)
    at java.util.ResourceBundle.getBundle(Unknown Source)
    at NotesToolTest.<clinit>(NotesToolTest.java:28)
    I got the problem why this happening...because notes.properties is not included in jar file...that's why the above exception is coming.
    But my problem is can i run the java file that will take .prooperties file dynamically(if .property is available on the current directory)...
    Thanks in advance,,,,
    Regards,
    Sankar

    because notes.properties is not included in jar file..Wrong. It is simply not available in the classpath.
    The solution is either putting the properties file in the classpath of JVM used, or adding the system path to the propertiesfile to the classpath of the JAR.

  • How To read an XML file with JDom

    I have read through some tutorials after installing JDom on how to read an existing XML file and I was confused by all of them. I simply want to open an XML file and read one of the node's content. Such as <username>john doe</username> this way I can compare values with what the user has entered as their username. I am not sure were to start and I was hoping someone could help me out.
    I know that this seems like an insecure way to store login information but after I master opening and writing XML files with JDom I am going to use AES to encrypt the XML files.

    Here is a test program for JDom and XPath use considering your XML file is named "test.xml" :import org.jdom.input.*;
    import org.jdom.xpath.*;
    public class JDomXPath {
    public static void main(String[] args) {
      SAXBuilder saxBuilder = new SAXBuilder("org.apache.xerces.parsers.SAXParser");
      try {
       org.jdom.Document jdomDocument = saxBuilder.build("test.xml");
       org.jdom.Element usernameNode = (org.jdom.Element)XPath.selectSingleNode(jdomDocument, "//username");
       System.out.print(usernameNode.getText());
      } catch (Exception e) {
       e.printStackTrace();
    }(tested with Eclipse)

  • How to read an xml file ?

    using this : <mx:Model id="data" source="data.xml"/>
    but then how i can convert it to XML object ?
    thank you .

    I tried both ways but it fails. im so angry about it.
    i used the HttpService as follows:
    panel.title = feedRequest.lastResult.data.task
    .startDate ;
    // here it is okay, the panel title is changed to the given
    data.
    however, when i convert it to xml object and try to read the
    data using the following code:
    var myXML:XML = new XML(feedRequest.lastResult.data) ;
    p.title = myXML.task[0].startDate ;
    //it shows me an error : "A term is undefined and has no
    properties."
    here is the structure of my xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <data>
    <task>
    <taskID>1</taskID>
    <startDate>1/15/2007</startDate>
    <endDate>2/15/2007</endDate>
    <progress>35</progress>
    </task>
    please help, it is very important for me.

  • How to read an XML file from embedded PAR file?

    I have an XML file that has been included in the PAR file as a means of storage (instead of hosting it to a web server).  Is there a way to read this file from within a java iView?  I have tried various methods without much luck.  (I can't seem to locate the file in the portal repository like I could with htmlb's Image class.
    Any thoughts?
    Thanks

    Hi,
    try this one:
    File myxmlFile = new File(portalRequest.getPrivateResourcePath(),"Path/to/my/file/after/PORTAL-INF/myfile.xml");

  • How to read a xml file with StringReader class

    Hi,
    I need to read a XML document with StringReade class. My aplication receives an absolute path but this doesn't work:
    StringReader oStringReader =
    new StringReader(c:\java\libros.xml);
    However it works with:
    StringReader oStringReader =
    new StringReader("<?xml version="1.0" e......");
    ie, with the whole document as a String, but I need to do it as the frist way.
    Thanks

    Hi,
    I need to read a XML document with StringReade class.
    My aplication receives an absolute path but this
    doesn't work:
    StringReader oStringReader =
    new StringReader(c:\java\libros.xml);
    However it works with:
    StringReader oStringReader =
    new StringReader("<?xml version="1.0" e......");
    ie, with the whole document as a String, but I need
    to do it as the frist way.
    Thankstake a look at this link:
    http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html

  • How to load a XML file into a table using PL/SQL

    Hi Guru,
    I have a requirement, that i have to create a procedure or a package in PL/SQL to load  XML file into a table.
    How we can achive this.

    ODI_NewUser wrote:
    Hi Guru,
    I have a requirement, that i have to create a procedure or a package in PL/SQL to load  XML file into a table.
    How we can achive this.
    Not a perfectly framed question. How do you want to load the XML file? Hoping you want to parse the xml file and load it into a table you can do this.
    This is the xml file
    karthick% cat emp_details.xml
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <EMPNO>7782</EMPNO>
      <ENAME>CLARK</ENAME>
      <JOB>MANAGER</JOB>
      <MGR>7839</MGR>
      <HIREDATE>09-JUN-1981</HIREDATE>
      <SAL>2450</SAL>
      <COM>0</COM>
      <DEPTNO>10</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7839</EMPNO>
      <ENAME>KING</ENAME>
      <JOB>PRESIDENT</JOB>
      <HIREDATE>17-NOV-1981</HIREDATE>
      <SAL>5000</SAL>
      <COM>0</COM>
      <DEPTNO>10</DEPTNO>
    </ROW>
    </ROWSET>
    You can write a query like this.
    SQL> select *
      2    from xmltable
      3         (
      4            '/ROWSET/ROW'  passing xmltype
      5            (
      6                 bfilename('SDAARBORDIRLOG', 'emp_details.xml')
      7               , nls_charset_id('AL32UTF8')
      8            )
      9            columns empno    number      path 'EMPNO'
    10                  , ename    varchar2(6) path 'ENAME'
    11                  , job      varchar2(9) path 'JOB'
    12                  , mgr      number      path 'MGR'
    13                  , hiredate varchar2(20)path 'HIREDATE'
    14                  , sal      number      path 'SAL'
    15                  , com      number      path 'COM'
    16                  , deptno   number      path 'DEPTNO'
    17         );
         EMPNO ENAME  JOB              MGR HIREDATE                    SAL        COM     DEPTNO
          7782 CLARK  MANAGER         7839 09-JUN-1981                2450          0         10
          7839 KING   PRESIDENT            17-NOV-1981                5000          0         10
    SQL>

Maybe you are looking for

  • ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from OWB_75

    ORA-28500: connection from ORACLE to a non-Oracle system returned this message: ORA-02063: preceding line from OWB_75 Scenario: I am having difficulty getting ODBC connection between Oracle OWB app with an 11gR2 DB (running on a VirtualBox Linux) and

  • B1DE Professional Installer Problems

    I have created an installer solution using the wizard once and it worked, but after I've deleted it and trying use the wizard again, I'm getting the same error every time: "cannot add link because the \setup.exe doesn't exist". I think I'm doing some

  • MBP won't access WiFi

    my MacBook Pro (circa 2008 running Snow Leopard) all of a sudden will not access my WiFi (ATT U-Verse gateway). My iPhone & Roku access the internet fine. I tried Network assistant and restart. The router ID is seen on the MBP but it cannot gdet to i

  • Redirection without web-auth

    Hi all, I came across a  setup which is bit different to what I have seen in the past. Basically the client gets redirected  to the NAC login page but there is no web-auth related configs under the WLAN on the WLC. Just to confirm I had look at the W

  • Add additional licenses into CUCM 9

    Hello, We already have licenses installed into ELM 9. We want to add 50 Enhanced licenses. We generate new licenses based on text & new PAK but when we installed the licenses, it overlaps the existing licenses. I gone through "Use the Add Licenses wi