Xml data from database using jdbc

I should get the xml data from database. Is this scenario possible using jdbc adapter ? If possible, how can I get it ?. Plz help me

I suppose that probably, xml data are stored in a BlobImage Field.
You can use a Stored Procedure on Database Side, to select and put out the xml data structured in output fields or structures.
From JDBC Sender channel, you can call the SP, that raise out a Structure formatted like the XML Data stored in Xml Database field.
In your opinion, this should be a possible way to achieve this issue?

Similar Messages

  • Retriving data from database using JDBC and mysql.

    st=con.createStatement();
    st.executeUpdate("INSERT INTO temperature(`temp`) VALUES ('"+name+"')"); ResultSet rs = st.executeQuery("Select * from temperature");
    String s1="";
    while(rs.next())
    s1= rs.getString(1);
    document.write(s1+"-----------------------------");
    }when i am retriving data from data base i am getting data which i inserted before.how to display present inserted data? i heard we should use scrollable.can any one how to do this.
    Date&time: Thu Feb 28 18:41:40 PST 2008 -----------------------------NANDA----------------------------
    [[email protected]----1name=2name=3name=4name=5name=6-----------------------------
    1123456-----------------------------123456-----------------------------1,2,3,4,5,20-----------------------------

    Hi,
    st=con.createStatement();
    st.executeUpdate("INSERT INTO temperature(`temp`) VALUES ('"+name+"')");
    //Changes in the query
    ResultSet rs = st.executeQuery("Select * from temperature where temp ='"+name+"' ");
    String s1="";
    while(rs.next())
    s1= rs.getString(1);
    document.write(s1+"-----------------------------");
    //Select * from temperature where temp ='"+name+"'
    The above query which results the last updated information

  • Question regarding Polling data from database using DB Adapters in BPEL

    Hi,
    I have the following question regarding Polling data from database using DB Adapters in BPEL -
    If I am selecting data from multiple tables/view to ultimately generate hierarchical xml document, is there a way that I specify polling all of these tables/views. Is polling limited only to one table/view?
    Thanks
    Ravi

    Hi Ravi,
    your question seems to have been answered for the question of polling a set of tables with one as the root, and getting back a hierarchical xml representing multiple related tables.
    However you can also poll for changes to both the root table and its related tables. Not sure if this was your question or the one already answered. If the former please check out the sample
    bpel/samples/tutorials/122.DBAdapter/advanced/polling/PollingForChildUpdates
    Thanks
    Steve

  • Help , How to get data from database using recordset with UI API

    I want to get a data from database
    when I want to create recordset i notice that UI API didn't has record set
    so I created recordset using DI API (SAPbobscom.recordset and SAPbobscom.company)
    ======================================================
    Dim oCompanyUI As SAPbouiCOM.Company <<UI API
    Dim oRecSet As New SAPbobsCOM.Recordset << DI API
    Dim oCompanyDI As New SAPbobsCOM.Company << DI API
    '=====================================================
    oCompanyDI.Connect
    Set oRecSet = oCompanyDI.GetBusinessObject(BoRecordset)
    oRecSet.DoQuery ("SELECT T0.CardCode, T0.CardName FROM OCRD T0")
    SBO_Application.MessageBox oRecSet.Fields.Item(1).Value
    ======================================================
    but I got an error it said "you are not connected to company"
    I'm really don't have an idea about how to get a data from using UI API (exp I want to get a date or costumer code)
    can someone help me please, I really need it
    Thanks

    you need a single sign on
            Dim oDICompany As SAPbobsCOM.Company
            Dim sCookie As String
            Dim sConnStr As String
            Dim ret As Integer
            oDICompany = New SAPbobsCOM.Company
            sCookie = oDICompany.GetContextCookie
            sConnStr = SBO_Application.Company.GetConnectionContext(sCookie)
            If oDICompany.Connected Then
                oDICompany.Disconnect()
            End If
            ret = oDICompany.SetSboLoginContext(sConnStr)
            If Not ret = 0 Then
                SBO_Application.MessageBox("set Login Context failed!")
                Exit Sub
            End If
            ret = oDICompany.Connect()
            If Not ret = 0 Then
                SBO_Application.MessageBox("Company Connect failed!")
            End If

  • Help for retrieve xml data from database.

    Hello friends,
    I am inserting xml file into oracle database.
    column name is xyz_xml and data type is XMLType.
    I have successfully inserted that.
    But My problem is How can i retrieve that xml file from database and can view in explorer as a text.
    If any one have any idea than let me know.
    Thanks

    Hello Friend...!
    I am getting the following error and i am not figure out this error :
    NosuchfieldException : conversionPlease Help me.

  • How save & retrive data from database using flex, coldfusion, sql server

    hi , i am very new in flex, i am trying to insert data in
    database using flex2, coldfusion, sql server. any one can help me
    please. or give me any example.

    Hi try to goto the following sites, you will get some
    direction to think
    http://weblogs.macromedia.com/pent/archives/2006/11/example_of_flex.cfm
    http://pdxphp.org/node/258
    Good Luck

  • How to fetch data from Database using SUP MBOs

    I'm learning to develop blackberry apps using SUP.I am new to both blackberry api and SUP.
    I need to make a login page for a Student and then validate the username and password entered using data from a database.
    I need to check the database for the username and password entered. What should be my next step? How do i get this data from the database. Using findAll() method is not working . Do i need to connect to SCC or unwired server first. If yes , then someone please provide a sample code for it.

    Hi!, I see your code and I see that you have a fee errors, try to use this:
    import java.text.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.OutputStream;
    * NOTE: You must put the try-catch and your sql code into the get method
    /** Servlet program to take fetchdata from database and display that on the broswer*/
    public class Fetchdata
        extends HttpServlet {
      String query = new String();
      String uid = "ashvini";
      String pwd = "******";
      public void doGet(HttpServletRequest request, HttpServletResponse response) throws
          ServletException, Exception {
        try {
          Connection con = null;
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          String url = "jdbc:odbc:Testing";
          con = DriverManager.getConnection(url, uid, pwd);
          Statement s = con.createStatement();
          query = "select * from gowri.msllst1";
          ResultSet rs = s.executeQuery(query);
          response.setContentType("text/html");
          ServletOutputStream out = response.getOutputStream();
          out.println("<HTML>" + "<BODY BGCOLOR=\"#FDF5E6\">\n" +
                      "<H1 ALIGN=CENTER>" + title + "</H1>\n" +
                      "<table>" + " <th>ITEM Code</th>");
          while (rs.next()) {
            out.println("<tr><td>" + rs.getString(1).trim() + "</td></tr>");//I change </tr></td> for </td></tr>
          } //end of while
          out.println("</table></BODY></HTML>");
        catch (Exception e) {
          System.out.println(e);
      } //end of doGet method
    }I hope this help you :)

  • Error while retrieving data from sql using jdbc adapter

    hi all,
    i m working on one scenario where i m sending data using HTTP and receiver is jdbc adapter which is retrieving me data from sql server.
    i have checked the structure both for req and res.
    i m getting this error
    <SAP:Error>
    <SAP:Category>Application</SAP:Category>
    <SAP:Code>MAPPING.EXCEPTION_DURING_EXECUTE</SAP:Code>
    <SAP:P1>com/sap/xi/tf/_INF57285_DB_HR_RES_</SAP:P1>
    <SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>
    <SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>
    <SAP:Stack>During the application mapping com/sap/xi/tf/_INF57285_DB_HR_RES_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>
    </SAP:Error>
    can somebody help me with this.
    Thanks & Regards
    Aruna

    thnks bhavesh i think i made it that way
    JDBC REQ  
      <ns:INF57285_DB_Request xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <Employee>
        <EmpDetails action="SELECT">
          <table>EmpDetails</table>
          <access>
            <Name />
            <EmpId />
            <Band />
            <Salary />
          </access>
          <Key>
            <EmpId>57285</EmpId>
          </Key>
        </EmpDetails>
      </Employee>
    </ns:INF57285_DB_Request>                        
      JDBC RES
    <ns:INF57285_DB_Request_response xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <Employee_response>
        <row>
          <Name>aruna</Name>
          <EmpId>57285</EmpId>
          <Band>A</Band>
          <Salary>4675776</Salary>
        </row>
      </Employee_response>
    </ns:INF57285_DB_Request_response>
    my hr req is which i mapped with DB req
    <ns:INF57285_HR_Req xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <REQUEST>
        <EmpNo>57285</EmpNo>
      </REQUEST>
    </ns:INF57285_HR_Req>
    my hr res is which i mapped with DB res
    <ns:INF57285_HR_Res xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">
      <response>
        <row>
          <Name>aruna</Name>
          <Empld>57285</Empld>
          <Salary>4675776</Salary>
        </row>
      </response>
    </ns:INF57285_HR_Res>
    and interestingly i am not getting any error in sxmb_moni
    it's not showing any error
    plz suggest me something wht to do ....
    thnks & regards
    Aruna

  • Displaying data from database using Repeater

    Hi,
    I have created a database with 3 column in a table.Where column 1 is username and column 2 is Report name.
    Column 1 has 2 user :-
    user1-----> ABC
    user2-----> PQR. So if i select ABC i am getting 2 records from Report based on ABC and if i select PQR i get 1 record from Report based on PQR.Till here i have done
    Now I am using repeater control and binding the data from the database.but the problem is I want hyperlink on the data which is populating.Since i am using repeater,i am able to fetch 2 records for Report.I want hyperlink on it so i am using anchor tag with
    href,Now both the records are redirecting to the same page.I want each record should redirect to different page.Please help me if any one know about these.
    Thansk Regards,
    Simanchal

    Hi,
    Base on your description here:
    "I want hyperlink on it so i am using anchor tag with href,Now both the records are redirecting to the same page"
    I agree with Bob you have to consult this issue on this forum:
    http://forums.asp.net/24.aspx/1?Web+Forms+Data+Controls
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to fetch data from DataBase using Servlet ?

    Hi all,
    Till now, i was just sending values from web page and receive the data in excel format using servlets.
    But, now, i want to fetch data from data base. I will be giving inputs in the web page(for the query)....ON click of submit button,
    Servlet should be called.
    Depending on the input, query has to be executed, and response should be sent to the user.
    How to do it?
    Code
    import java.text.*;
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.OutputStream;
    /** Simple servlet that reads three parameters from the html
    form
    public class Fetchdata extends HttpServlet
              String query=new String();
              String uid="ashvini";
              String pwd="******";
              try
                   Connection con=null;
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");     
                   String url = "jdbc:odbc:Testing";     
                   con = DriverManager.getConnection(url, uid, pwd);
                   Statement s = con.createStatement();
                   query = "select * from gowri.msllst1";
                   ResultSet rs = s.executeQuery(query);
              public void doGet(HttpServletRequest request,HttpServletResponse response)
              throws ServletException, IOException
                        response.setContentType("application/vnd.ms-excel");
                        ServletOutputStream out=response.getOutputStream();
                        out.println("<HTML>" +"<BODY BGCOLOR=\"#FDF5E6\">\n" +
                        "<H1 ALIGN=CENTER>" + title + "</H1>\n" +
                        "<table>" +" <th>ITEM Code</th>");
                        while(rs.next())
                        out.println("<tr><td>" rs.getString(1).trim()"</tr></td>");
                        }//end of while
                        out.println("</table></BODY></HTML>");
                   }//end of doGet method
         }catch(Exception e)
                        System.out.println(e);
    It is giving error message as:
    C:\Program Files\Apache Tomcat 4.0\webapps\general\srvlt>javac Fetchdata.java
    Fetchdata.java:17: illegal start of type
    try
    ^
    Fetchdata.java:48: <identifier> expected
    ^
    2 errors
    Is this format is correct? am i placing this doGet method at the right place? is my program's logic is correct?
    Please help me?
    Regards
    AShvini

    There is some mistakes in ur code.....how can try catch exists outside a function???
    make use of try catch isde ur doGet method and put
    Connection con=null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:Testing";
    con = DriverManager.getConnection(url, uid, pwd);
    Statement s = con.createStatement();
    query = "select * from gowri.msllst1";
    ResultSet rs = s.executeQuery(query);
    isdie doGet method, for the time being,
    i think u get me..
    regards
    shanu

  • Displaying data from database using AJAX

    Hi,
    I have a table that holds data from a database, on each row I have a hyperlink.
    When the user presses the hyperlink the table drops down and displays some additional data,I am trying to display another table of data based on the ID of the row selected. As the second table holds a lot of data I was hoping to use AJAX. Does anybody know of any good tutorials or how to retrieve data from a database based on the ID of the row for .jspx pages.
    Regards
    Steve

    Hi Steve,
    Follow the steps below to achieve what you want:
    a. Specify actionListener for the commandlink component, when the user clicks it invokes the actionListener method in the backing bean(in which you can get the id of the selected row from the ActionEvent), perform the call to your database and fetch the data required for the second table
    b. Set PartialTriggers property of second table to the id of the command link
    Hope this helps.
    Sireesha

  • Fetch Data from Database using JSP

    Dear friends,
    I am developing a portal for my College. The theme is to automate student details.
    Here i have Screens for Posting, Editing , Viewing.
    In Editing: I fetch the data from the backend using select query.
    In the address field: I have value as "Big House".
    The user keyed with double quotes when he keyed.
    During extraction of the data i put the value inside a textbox as
    <input type=text name=st1 value="<%=res.getString("street1")%>">
    Here,
    the value becomes as
    <input type=text name=st1 value=""Big House "">
    Here, you can notice that Big house i prefixed by double -double quotes.
    The value should be Big House but the values is empty.
    What i should. ???
    Thanks in Advance.
    Rengaraj.R

    Try this:
    <%
    String addr = res.getString("street1");
    //escape the double quotes from the address
    addr = addr.replaceAll("[\"]",""");
    %>
    <input type="text" name="st1" value="<%=addr%>">

  • Load interactive pdf with data from database

    I am trying to understand our options for loading database data into an interactive pdf..?   Some of the data is not stored in the database and needs to be manually entered by the user in the interactive pdf.
    Here is the interactive pdf I'm working with:
    http://www.dcma.mil/dcman/NPP/files/dd1149.pdf
    As I understand it, there are 2 options:
    1.  Create an xml file from the database data.   Users can manually import this xml file into this existing interactive pdf and then manually add the additional data, and save the interactive pdf.
    Would users need to use Adobe acrobat Standard or Pro edition to import the xml data?
    2.  Create a XFA PDF form that's made with LiveCycle Designer.   Can this method create an interactive pdf so that users can enter additional data later and save the pdf?  
       What adobe products are required to use this method?
    thanks for any assistance..
    -D

    Yes,using LiveCycle you could accomplish this easily.Once you have your invoice form ready based on predefined XSD, you can easily update the form data by fetching the values from database using JDBC operation.Also you could email this updated form using Email service.
    Thanks,
    Wasil

  • Constructing Jtree with data from Database

    Hi
    I am new to JTree and I need some help. My problem goes like this. I have a table in the data base which has data like Folder_Nr, Folder_Name, Folder_Prev_Nr, Folder_Typ_Nr, Folder_Access.
    If the Folder_Nr is 1 and folder_prev_nr =0, then it is a root folder and if folder no is 3 and folder_prev_no is 1 then it is a sub folder of the Folder_Nr 1. and so on is the data. I need to present all these folders in a JTree and be able to dynamically add and delete folders.
    It will be of great help if anyone can provide me with some lead or some source code.
    Thanking u in advance
    BalaaP

    Yes,using LiveCycle you could accomplish this easily.Once you have your invoice form ready based on predefined XSD, you can easily update the form data by fetching the values from database using JDBC operation.Also you could email this updated form using Email service.
    Thanks,
    Wasil

  • Problem in displaying XML document from database

    Hi I am getting only record in printing xml file which takes from data base.
    Here is my programme.
    Document doc;
    ����public void processTable(Connection con, String tableName)
    ����{
    ��������try
    ��������{
    ������������this.iColumnCount=0;
    ������������HashMap hm = new HashMap();
    ������������//XML related Interfaces
    ������������DocumentBuilderFactory dbf;
    ������������DocumentBuilder db;
    ������������Element rootElement = null;
    Element colData = null;
    ������������Element relElement = null;
    �����
    ������������//Database relevent Interface
    ������������ResultSet rslt = null;
    ������������DatabaseMetaData dmd = null;
    ������������ResultSetMetaData rsmd= null;
    ������������//Initilize the Factory Classes
    ������������dbf = DocumentBuilderFactory.newInstance();
    ������������db = dbf.newDocumentBuilder();
    ������������doc = db.newDocument();
    ������������//Assign the root elements to document
    ������������rootElement = doc.createElement("entity");
    colData = getColMetaData(tableName);
    ������������rootElement.appendChild(colData);
    ������������doc.appendChild(rootElement);
    ������������TransformerFactory tFactory = TransformerFactory.newInstance();
    ����������������Transformer transformer = tFactory.newTransformer();
    ����������������transformer.transform(new DOMSource(doc),
    ��������������������new StreamResult(new FileOutputStream(tableName+".xml")));
    ��������} catch (Exception sqle)
    ��������{
    ����������������e.printStackTrace();
    ��������}
    ����}
    ����/**
    �����* Method getColMetaData.
    �����* @param tableName
    �����* @return Element
    �����*/
    ����private Element getColMetaData(String tableName)
    ����{
    ��������try{
    ������������ResultSet rslt = null;
    ������������ResultSetMetaData rsmd = null;
    ������������DataTypeMap dtp = new DataTypeMap();
    ������������HashMap hm = new HashMap();
    ������������hm = dtp.DataTypes();
    ������������Connection con = db.createConnection();
    ������������Statement stmt = con.createStatement();
    ������������String sQuery = "select * from " +tableName;
    ������������rslt = stmt.executeQuery(sQuery);
    ������������rsmd = rslt.getMetaData();
    ������������Element rooElement = null;
    ������������//Element currentElement =null;
    ������������iColumnCount = rsmd.getColumnCount();
    ����������������Element currentElement = null;//doc.createElement("field");
    // rootElement = doc.createElement("column");
    ����������������for (int i = 1; i <= iColumnCount; i++)
    ��������������������{
    currentElement = doc.createElement("field");
    ������������������������currentElement.setAttribute("DBFieldName",rsmd.getColumnName(i));
    ������������������������currentElement.setAttribute("FieldName",rsmd.getColumnLabel(i));
    ������������������������
    ��������������������}
    ��������������return currentElement;
    ��������catch(Exception ee){
    ������������logger.info(ee.getMessage());
    ��������}
    ��������return null;
    ����}
    Here 'return currentElement;' return the collection of elements.But when I print
    document it is giving only last element.I am not getting how only one record is printing even it has more records
    please help me in this regards.
    here the out put:
    <?xml version="1.0" encoding="UTF-8"?>
    <entity>
    ��<field DBFieldName="X_TYPE" FieldName="X_TYPE"/>
    </entity>
    -krish
    [email protected]

    Problem in displaying the XML Data from database
    Hi I have requirement of generating the XML from database.I could able to acheive partially.
    I am giving the problem below.
    public void processTable()
    Element rootElement = doc.createElement("entity");
    Element colData= getColMetaData(tableName);
    rootElement.appendChild(colData);
    doc.appendChild(rootElement);
    //print the document
    /*getColData method as follows*/
    private Element getColMetaData(String tableName)
    try{
    ResultSet rslt = null;
    ResultSetMetaData rsmd = null
    Connection con = db.createConnection();
    Statement stmt = con.createStatement();
    String sQuery = "select * from " +tableName;
    rslt = stmt.executeQuery(sQuery);
    rsmd = rslt.getMetaData();
    iColumnCount = rsmd.getColumnCount();
    Element currentElement = doc.createElement("field");
    for (int i = 1; i <= iColumnCount; i++)
    currentElement.setAttribute("FieldName",rsmd.getColumnName(i));
    currentElement.setAttribute("Position", parseString(i));
    rootElement.appendChild(currentElement);
    return currentElement;
    catch(Exception ee){
    logger.info(ee.getMessage());
    return null;
    /* End of Method*/
    Here when I printing the document it is giving out put like :
    <entity >
    <field FieldName="X_ID" Position="1"/>
    </entity>
    The is displaying only one field information even though table contains more then one column.If we maintain all the aboue code in single method it is working fine.I want to decouple the like above.Bcz I may have more then one set of elements like this.
    Please help in this regards,
    -Krish
    [email protected]

Maybe you are looking for

  • Macbook pro and iphone connection weirdness

    I've recently replaced my old router with a netgear dgn2000 model (supports up to n wireless). My pc, xbox and ps3 connects to it without any problem but, sadly, any of the houses 3 apple products (macbook pro and 2 iphones) see the signal at full st

  • Problem with Changing Data while Import through Excel Sheet

    Hi Experts, I am new to SAP LUMIRA and I am facing an issue with it. Actually, I am importing the data for analysis from an Excel sheet into SAP LUMIRA. I am able to prepare the visualization in the first go. But If I am changing the number of column

  • CE 7.2 NWDS wdp ws client user authentication error

    Hello CE 7.2  experts ! I am running a CE 7.2 sp 01 env with NWDS. In my landscape I have some webservices running on PI 7.1. I am trying to develop a webdynpro webservice client. When run gets user authentication errors. I have configured the Servic

  • "F.F. servr redirectng request for this adres" when enter Gmail URL in adr. bar to createTab. How 2 fix?

    When I entered the Gmail URL into the F.F. Address bar a pop-up tells me: "The Page isn't redirecting properly; F.F. has detected that the server is redirecting the request for this address in a way that will never complete." I installed G. Chrome a

  • Web Broswers not displaying certain Flash items

    For some odd reason, some flash items will not display in any of my browsers (Safari 4, FireFox, or Opera). YouTube videos work fine and Flash based games are okay, but videos and the music player from MySpace don't seem to load, and videos from Funn