How to read XML schema from databank to post it in WebService Test

Hi Guys,
Does anyone have a solution to read the XML schema from databank (.csv file) and post it in a Web Service test case.
I mean by using utilities.loadXML, something like that?

SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
XMLReader xmlReader = spf.newSAXParser().getXMLReader();
and set the content handler

Similar Messages

  • How to read .xml file from embedded .swf(flash output) in captivate

    I have been trying to read .xml file from the .swf (Flash output) that is embedded within the captivate file but no luck yet . Please if anyone got any clue on how get this thing done using Action script 3.0 then let me know. I am using Adobe Captivate 5.5 at present and Flash CS 5.5.
    I am well aware about how to read .xml file through action script 3.0 in flash but when insert the same flash in captivate and publish nothing comes in captivate output. I would higly appreciate if anyone could help me out with that.
    Here is is graphical demonstration of my query :
    Message was edited by: captainmkv

    Hi Captainmkv,
    Does the information in this post cover what you're trying to do: http://forums.adobe.com/message/5081928#5081928
    Tristan,

  • How to Create XML Schema From JTree ?

    Please help me... Thank you.
    This is Code
    Tree.java ----- Run This File
    import java.awt.BorderLayout;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Tree extends JPanel implements ActionListener {
        private int newNodeSuffix = 1;
        private static String ADD_COMMAND = "add";
        private static String REMOVE_COMMAND = "remove";
        private static String CLEAR_COMMAND = "clear";
        private static String OK_COMMAND = "ok";
        private DynamicTree treePanel;
        public Tree() {
            super(new BorderLayout());
            //Create the components.
            treePanel = new DynamicTree();
            //populateTree(treePanel);
            JButton addButton = new JButton("Add");
            addButton.setActionCommand(ADD_COMMAND);
            addButton.addActionListener(this);
            JButton removeButton = new JButton("Remove");
            removeButton.setActionCommand(REMOVE_COMMAND);
            removeButton.addActionListener(this);
            JButton clearButton = new JButton("Clear");
            clearButton.setActionCommand(CLEAR_COMMAND);
            clearButton.addActionListener(this);
            JButton okButton = new JButton("OK");
            okButton.setActionCommand(OK_COMMAND);
            okButton.addActionListener(this);
            //Lay everything out.
            treePanel.setPreferredSize(new Dimension(300, 150));
            add(treePanel, BorderLayout.CENTER);
            JPanel panel = new JPanel(new GridLayout(0,1));
            panel.add(addButton);
            panel.add(removeButton);
            panel.add(clearButton);
            panel.add(okButton);
            add(panel, BorderLayout.LINE_END);
        /*public void populateTree(DynamicTree treePanel) {
            String p1Name = new String("Parent 1");
            //String p2Name = new String("Parent 2");
            String c1Name = new String("Child 1");
            //String c2Name = new String("Child 2");
            DefaultMutableTreeNode p1;
            p1 = treePanel.addObject(null, p1Name);
            //p2 = treePanel.addObject(null, p2Name);
            treePanel.addObject(p1, c1Name);
            //treePanel.addObject(p1, c2Name);
            //treePanel.addObject(p2, c1Name);
            //treePanel.addObject(p2, c2Name);
        public void actionPerformed(ActionEvent e) {
            String command = e.getActionCommand();
            if (ADD_COMMAND.equals(command)) {
                //Add button clicked.
                treePanel.addObject("New Node " + newNodeSuffix++);
            } else if (REMOVE_COMMAND.equals(command)) {
                //Remove button clicked.
                treePanel.removeCurrentNode();
            } else if (CLEAR_COMMAND.equals(command)) {
                //Clear button clicked.
                treePanel.clear();
            } else if (OK_COMMAND.equals(command)) {
                 //Ok button clicked.
                 treePanel.ok();
         * Create the GUI and show it.  For thread safety,
         * this method should be invoked from the
         * event-dispatching thread.
        private static void createAndShowGUI() {
            //Create and set up the window.
            JFrame frame = new JFrame("Craete XML Tree");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            //Create and set up the content pane.
            Tree newContentPane = new Tree();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            //Display the window.
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            //Schedule a job for the event-dispatching thread:
            //creating and showing this application's GUI.
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }DynamicTree.java
    import javax.swing.JOptionPane;
    import java.awt.GridLayout;
    import java.awt.Toolkit;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.tree.DefaultTreeModel;
    import javax.swing.tree.MutableTreeNode;
    import javax.swing.tree.TreePath;
    import javax.swing.tree.TreeSelectionModel;
    import javax.swing.event.TreeModelEvent;
    import javax.swing.event.TreeModelListener;
    public class DynamicTree extends JPanel {
        protected DefaultMutableTreeNode rootNode;
        protected DefaultTreeModel treeModel;
        protected JTree tree;
        private Toolkit toolkit = Toolkit.getDefaultToolkit();
        public DynamicTree() {
            super(new GridLayout(1,0));
            rootNode = new DefaultMutableTreeNode("Root Node");
            treeModel = new DefaultTreeModel(rootNode);
            treeModel.addTreeModelListener(new MyTreeModelListener());
            tree = new JTree(treeModel);
            tree.setEditable(true);
            tree.getSelectionModel().setSelectionMode
                    (TreeSelectionModel.SINGLE_TREE_SELECTION);
            tree.setShowsRootHandles(true);
            JScrollPane scrollPane = new JScrollPane(tree);
            add(scrollPane);
        /** Remove all nodes except the root node. */
        public void clear() {
            rootNode.removeAllChildren();
            treeModel.reload();
        public void ok() {
             int n = JOptionPane.showConfirmDialog(null, "Do you want to create XML Schema?", "", JOptionPane.YES_NO_OPTION);
        /** Remove the currently selected node. */
        public void removeCurrentNode() {
            TreePath currentSelection = tree.getSelectionPath();
            if (currentSelection != null) {
                DefaultMutableTreeNode currentNode = (DefaultMutableTreeNode)
                             (currentSelection.getLastPathComponent());
                MutableTreeNode parent = (MutableTreeNode)(currentNode.getParent());
                if (parent != null) {
                    treeModel.removeNodeFromParent(currentNode);
                    return;
            // Either there was no selection, or the root was selected.
            toolkit.beep();
        /** Add child to the currently selected node. */
        public DefaultMutableTreeNode addObject(Object child) {
            DefaultMutableTreeNode parentNode = null;
            TreePath parentPath = tree.getSelectionPath();
            if (parentPath == null) {
                parentNode = rootNode;
            } else {
                parentNode = (DefaultMutableTreeNode)
                             (parentPath.getLastPathComponent());
            return addObject(parentNode, child, true);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child) {
            return addObject(parent, child, false);
        public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
                                                Object child,
                                                boolean shouldBeVisible) {
            DefaultMutableTreeNode childNode =
                    new DefaultMutableTreeNode(child);
            if (parent == null) {
                parent = rootNode;
            treeModel.insertNodeInto(childNode, parent,
                                     parent.getChildCount());
            //Make sure the user can see the lovely new node.
            if (shouldBeVisible) {
                tree.scrollPathToVisible(new TreePath(childNode.getPath()));
            return childNode;
        class MyTreeModelListener implements TreeModelListener {
            public void treeNodesChanged(TreeModelEvent e) {
                DefaultMutableTreeNode node;
                node = (DefaultMutableTreeNode)
                         (e.getTreePath().getLastPathComponent());
                 * If the event lists children, then the changed
                 * node is the child of the node we've already
                 * gotten.  Otherwise, the changed node and the
                 * specified node are the same.
                try {
                    int index = e.getChildIndices()[0];
                    node = (DefaultMutableTreeNode)
                           (node.getChildAt(index));
                } catch (NullPointerException exc) {}
                System.out.println("The user has finished editing the node.");
                System.out.println("New value: " + node.getUserObject());
            public void treeNodesInserted(TreeModelEvent e) {
            public void treeNodesRemoved(TreeModelEvent e) {
            public void treeStructureChanged(TreeModelEvent e) {
    }

    XML shema is basically an XML file. So u need to know how to create an XML,
    provided u know how the shema file should be.
    Creating an XML :
    http://forum.java.sun.com/thread.jspa?threadID=5181031&messageID=9705786#9705786

  • How to read xml reports from external application

    Hi All,
    I want to generate reports from SIEBEL Database and access those reports from external application(like BlackBerry application). I have gone through by some blogs and found that we can access the generated reports from an external application using the URL.
    When I use this URL on browser it gives me the xml file of the report. But I am unable to read this file from the Blackberry application.
    Thanks in advance

    Hi Angha,
    I want to invoke other portal application from my application.
    Portal URL's also get changed from one system to Other. Prototype Portal->Development Portal -> Quality Portal->Production Portal>
    All the above Portal URL will be different.
    I want trigger another application dynamically.
    Thx & Rgds
    AW

  • How to read xml schema in java?

    hello,
    i need to read the xml schema file,and extract the details like element types.i need to read it not validate it .
    thank you.

    SAXParserFactory spf = SAXParserFactory.newInstance();
    spf.setNamespaceAware(true);
    XMLReader xmlReader = spf.newSAXParser().getXMLReader();
    and set the content handler

  • How to read xml data from jsf,

    Hi
    I would like to know how to read data in an xml so as we can display that data onto the jsf page to the user, say as a data table, or in an output txt box etc...

    This is nothing JSF-special. Just convert XML to objects (DTO's) and then use them in JSF.
    There are several ways to crawl the XML tree. JXPath and DOM4J are popular.

  • How to read XML files from java

    i need a sugession that how to read a xml file using java code
    and i need to parse using some parsers and display attributes and entity seperately
    as a string.......

    import org.dom4j.Document;
    import org.dom4j.DocumentException;
    import org.dom4j.io.SAXReader;
    import java.io.File;
    import java.text.AttributedCharacterIterator.Attribute;
    import java.util.Iterator;
    import java.util.StringTokenizer;
    public class XmlParser
    private String Result="";
    private String Final="";
    private String Delim="";
    public void bar1(Document document) throws DocumentException
    org.dom4j.Element root = document.getRootElement();
    // System.out.println(root.getName());
    bar2(root);
    System.out.println(this.Result);
    process();
    public void bar2(org.dom4j.Element e)
    for(Iterator i = e.elementIterator();i.hasNext();)
    org.dom4j.Element Element = (org.dom4j.Element) i.next();
    Result += Element.getName()+"\t"+Element.getText()+"\n";
    bar2(Element);
    public void process()
    StringTokenizer Tokenizer = new StringTokenizer(this.Result,"\n");
    String element;
    while(Tokenizer.hasMoreTokens())
    element = Tokenizer.nextToken();
    StringTokenizer Tokenizer2 = new StringTokenizer(element,"\t");
    // Do what ever String Process here Example
    this.Final += element.getName();
    this.Final += this.Delim;
    System.out.println(this.Final);
    public static void main(String s[])throws Exception
    Document document = null;
    SAXReader reader = new SAXReader();
    File f1= new File("D:/Rajesh/EDI to XML/EDI.xml");
    document = reader.read(f1);
    Demo obj = new Demo();
    obj.bar1(document);
    i think this will hep full.......

  • How to read XML content from IPortalComponentRequest and parse them

    Hi ,
    I have a portal application.The application has 2 components(Comp1,comp2).
    Comp1 is JspDynpage and Comp2 is AbstractPortalComponent.
    Comp1- has a iframe element which point to the external url and has a parameter return_url.
    retrun_url has a value as url to Comp2(http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp)
    When an event occurs in the external site,i suppose to receive XML content in return_url(ie Comp2),how can i check using the request if the received content is XML and how do i parse them.
    I have already seen blogs from Prakash singh in which it refers a xml fixed location in webserver.

    Hi Detlev,
    i am reposting this once again as the previous
    reply didnt align good.
    Thanks for your reply.The scenario is that
    My portal application has to communicate with external GIS(Graphical information system)
    service provider client application.
    They say that i have to use iframe in my portal application.
    Here is the snipet of the iframe tags.
    <iframe
    id="Nedbrowser"
    name="Nedbrowser"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:0; left:0; width:800; height:400; z-index:100; visibility:visible"
    src="http://nbg.nedg.nl/nbgint/NBG_INT_main.asp?action=CHART&datasource=NBGMV&product=INTERNET&size_x=300&size_y=300&result_frame=Results&
    result_url=http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp&
    default_centre_x=256000&default_centre_y=471000&default_width=0.5">
    </iframe>
    <iframe
    id="Results"
    name="Results"
    width="100%"
    height="100%"
    frameborder="no"
    marginheight="0"
    marginwidth="0"
    scrolling="no"
    style="position:absolute; top:400; left:0; width:800; height:200; z-index:100; visibility:visible"
    src="about:blank">
    </iframe>
    When my portal application is started, comes the GIS map in the iframe with in my portal application.
    When the user clicks in the area of the map,Gis application returns xml data to the return_url.
    The reurn_url is my PortalAbstractComponent in which i have to parse the xml and use it for further processing in R3 system.

  • How to read XML data from URL

    Hi All,
    I have one requirement. I have one URL which gives me data in XML format. I need to read this file and store this data into my SAP tables.
    Can anybody suggest how read this XML file using URL?
    Thanks in advance,
    P.Shridhar.

    Use a Server java proxy generated from your inbound message interface which would make a URLConnection to the specified URL after it gets triggered by BPM. A code snippet to achieve the same could be
    URL url  = null;
    URLConnection conn = null;
    BufferedReader in = null;
    url = new URL("http://someurl.someserver.com");
    conn = url.openConnection();
    in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
    String line = null;
    StringBuffer xml = new StringBuffer();
    while ((line = in.readLine()) != null){
            xml.append(line);
    -- amol

  • How to read XML response from a URL in java?

    Hi .
    I need to write a simple function that takes a URL and processes the response which is XML or JSON.
    I tried this code:
    URL l_url = new URL(serviceURL);
    URLConnection urlConnection = l_url.openConnection();
    InputStream inputStream = l_url.openStream();
    DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
    DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
    Document inputXML = documentBuilder.parse(inputStream);
    but in line number 3 it throws an error:
    "l_url.openStream() = >Exception occurred in target VM: Server returned HTTP response code: 401 for URL:"
    Please let me know how do I achieve it.
    Thanks and regards,
    Sonal

    Sonal wrote:
    "l_url.openStream() = >Exception occurred in target VM: Server returned HTTP response code: 401 for URL:"
    Please let me know how do I achieve it.you achieve it by fixing your authentication problem (401 is the response code indicating your request was not authorized, which you can easily find out with a simple google search).

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to read XML from web page inside servlet/jsp ?

    i have a url, which on sending request, shows XML in browser.
    Now i need to read this XML in browser and then manipulate it according to my need and display it on another page.
    actually the process is. :
    1) i have to first retrieve an xml from other site. (XML will only be shown in browser)
    2.)then i have to read the Xml and show it in according to my requirements.
    Is there any way to read XML directly from a Web Page ??
    is their logic to accomplish this.
    e.g in Servlet i can do somewhat like this :
    String wholeXml=Somemethod(url);
    Please Advice

    Hi,
    if u wanna extract data from XML. you can use Digester(Apache-jakarta) parser. All u need to create the beans(as per the data in xml), that will be populated by Digester.
    Digester takes xml(string) as parameter and populates the bean specified.
    U can use this bean in ur JSP.
    :::Note:::; use Digester in ur servlet.
    for more read:::
    http://www.onjava.com/pub/a/onjava/2002/10/23/digester.html
    I hope it shall work..
    @mit

  • How to read xml

    I'm getting xml from   customFieldsFeed.getEnumerationValues()  it is comming from  a web services looks like this
    <xml-fragment xmlns:b=""http://schemas.microsoft.com/2003/10/Serialization/Arrays""
    xmlns:i=""http://www.w3.org/2001/XMLSchema-instance""
    xmlns:a=""http://schemas.xxxxxxxx""
    xmlns:u=""http://docs.oasis-open.org/wss/xxxxxxx-utility-1.0.xsd""
    xmlns:s=""http://schemas.xmlsoap.org/soap/envelope/"">
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>AAAAA</a:EnumerationID>
        <a:Name>A3 MFD</a:Name>
      </b:anyType>
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>BBBBB</a:EnumerationID>
        <a:Name>A3 Printer</a:Name>
      </b:anyType>
      <b:anyType i:type=""a:Enumeration"">
        <a:EnumerationID>CCCCC</a:EnumerationID>
        <a:Name>A4 MFP</a:Name>
      </b:anyType>
    </xml-fragment>"
    I need to read EnumerationID ex if AAAAA need to retrive Name value " A3 MFD"
    java 1.6
    Thanks,
    HJ

    This could be a starting point:
    http://stackoverflow.com/questions/2811001/how-to-read-xml-using-xpath-in-java
    bye
    TPD

  • Can you generate XML schema from XMLDB?

    I have not used XMLDB and don´t read the entire doc about the product(sorry for that).
    I got the following question, is it possible to generate a XML schema from relational data through XMLDB? Or is this best done via a third party software like XMLSpy or alike?

    3rd Party Software...
    We can generate a schema for an object Hierarchy but our considered opinion is that there is no sensible way to generate an XML Schema representation of a purely relational data structure. It requires a tool which allows you to make decisions on how to organize the heirarchy.

  • How to refresh XML file  from my client machine

    Hai All
    I have temp.XML and temp.XSL template in our server machine.
    when i give a print from client machine first time it gives the record,and next time it did not get refresh.Always it shows the previous records in the browser.But when i go into the server machine and click on temp.xml,it shows the current record(correct records)
    How to refresh XML file  from my client machine?
    Regards
    Dhina

    You never delete a Time Machine backup by dragging it to the Trash. You are supposed to use the TM application to manage the backups. What you will need to do now is to simply erase the drive using Disk Utility.

Maybe you are looking for

  • AL Clearing Account Difference

    Hello, When i checked a GL Account in FBL3N, there are 339 open items available with Balance "0" till date. But when I am trying to clear all the line items with F-03 then it is showing only 278 line items with 15 Cr as not assigned amount. Please he

  • Work flow in 4.6c

    Dear all,                Is workflow sysytem is attached with the 4.6c version, If not is it possible to create with the help of abap in 4.6, Please tell me your suggestion Best Regards, Kumar

  • How to create web items with different quantities?

    Hi, I have B1 inventory items that are single items but we will be selling them on the web as 'packages' of different quantities.  For example, we would like the user to be able to select the web item, then be presented with a drop down (attribute) o

  • My nokia x2-0r showing no number in call log

    How can i delete the no number entry in my call log. Tried to delete it bt showing invalid selection. Have tried all the ways, restore factory, delete log list, software update but the problem presists. Please tell me what to do?

  • Configuration of Planning fails on new Db server.

    Hi guys, I want to reconfigure my EPM system 113 to new Db server machine but with old databases,(restored from old Db machine) All components were configured well, except Planning. Here is scenario, I have 3 system as, A : EPM 11.1.1.3 B : SQL serve