How to transfer XML-Data into a WebDynPro-Application?

An external partner has a calling interface that sends a HTTP-Redirect to a specific application-url and transfers all the data in one POST-Parameter.
The value of this POST-Paramater (CALLINTERFACE) consists the XML-Data.
<form id='InterfaceData3' method='post' action='/ProduktFrontController/Start'>
<textarea cols="80" rows="30" name='CALLINTERFACE'><?xml version="1.0" encoding="UTF-8"?>
  <authentifizierung version="1.0">
       XML-Data.....
  </authentifizierung>
<br>
<p><input id='button1' type='submit' name='Button' value='Absenden'></p>
</form>
Standard-Java:
In our Java-Application we can read the POST-Value (XML-Data) via the HTTPServletRequest-Object/Instance.
WebDynPro-Java:
IWDProtocolAdapter protocolAdapter = WDProtocolAdapter.getProtocolAdapter();
IWDRequest request = protocolAdapter.getRequestObject();
String xmlData = request.getParameter("CALLINTERFACE");
In WebDynPro for ABAP I couldnt find a equivalent solution /technic to read the POST-Parameter-Value.
So I have to write a lot of annoying 'glue-code':-(      (HTTP-Request-Handler for reading, Shared Memory / Objects for transfer to WebDynPro ABAP),
(Remark: It's no solution to transfer XML-Data via a URL-Parameter because it is too big (> 1 KByte) and the external partner doesn't support this option!).
My questions:
1) What technics for transfering Data (not only 2 or 3 Parameter) form external web-applications into WebDynPro ABAP applications does SAP support?
2) Is it possible to reach the calling HTTP-Request from WebDynPro-ABAP? (MayBe via ABAP-Callback-Functions)
Sincerely
Steffen

Hi,
thank you for your answers:-)
In conclusion the result is:
1) There is no "direct" way to read POST-Parameter in WebDynPro ABAP
=> You have to write a wrapper in BSP or an ICF -  HTTP_REQUEST_HANDLER
  (A  ABAP-Class that implements the Interface "IF_HTTP_EXTENSION"
     that reads the POST-Parameter-Value and transfers the value into a reachable localtion for WebDynPro-Abap.
2) For parsing the XML-Data I can use for example STRANS tcode or  Simple Transformations
3) For transfering the Data between the BSP / the Request-Handler and WebDynPro for ABAP, I can use for example SharedMemory, Shared Objects.
Regards
Steffen
Edited by: Steffen Spahr on Jul 19, 2011 8:35 AM
Edited by: Steffen Spahr on Jul 19, 2011 8:55 AM

Similar Messages

  • How to parse xml data into java component

    hi
    everybody.
    i am new with XML, and i am trying to parse xml data into a java application.
    can anybody guide me how to do it.
    the following is my file.
    //MyLogin.java
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    class MyLogin extends JFrame implements ActionListener
         JFrame loginframe;
         JLabel labelname;
         JLabel labelpassword;
         JTextField textname;
         JPasswordField textpassword;
         JButton okbutton;
         String name = "";
         FileOutputStream out;
         PrintStream p;
         Date date;
         GregorianCalendar gcal;
         GridBagLayout gl;
         GridBagConstraints gbc;
         public MyLogin()
              loginframe = new JFrame("Login");
              gl = new GridBagLayout();
              gbc = new GridBagConstraints();
              labelname = new JLabel("User");
              labelpassword = new JLabel("Password");
              textname = new JTextField("",9);
              textpassword = new JPasswordField(5);
              okbutton = new JButton("OK");
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 5;
              gl.setConstraints(labelname,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 5;
              gl.setConstraints(textname,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 10;
              gl.setConstraints(labelpassword,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 2;
              gbc.gridy = 10;
              gl.setConstraints(textpassword,gbc);
              gbc.anchor = GridBagConstraints.NORTHWEST;
              gbc.gridx = 1;
              gbc.gridy = 15;
              gl.setConstraints(okbutton,gbc);
              Container contentpane = getContentPane();
              loginframe.setContentPane(contentpane);
              contentpane.setLayout(gl);
              contentpane.add(labelname);
              contentpane.add(labelpassword);
              contentpane.add(textname);
              contentpane.add(textpassword);
              contentpane.add(okbutton);
              okbutton.addActionListener(this);
              loginframe.setSize(300,300);
              loginframe.setVisible(true);
         public static void main(String a[])
              new MyLogin();
         public void reset()
              textname.setText("");
              textpassword.setText("");
         public void run()
              try
                   String text = textname.getText();
                   String blank="";
                   if(text.equals(blank))
                      System.out.println("First Enter a UserName");
                   else
                        if(text != blank)
                             date = new Date();
                             gcal = new GregorianCalendar();
                             gcal.setTime(date);
                             out = new FileOutputStream("log.txt",true);
                             p = new PrintStream( out );
                             name = textname.getText();
                             String entry = "UserName:- " + name + " Logged in:- " + gcal.get(Calendar.HOUR) + ":" + gcal.get(Calendar.MINUTE) + " Date:- " + gcal.get(Calendar.DATE) + "/" + gcal.get(Calendar.MONTH) + "/" + gcal.get(Calendar.YEAR);
                             p.println(entry);
                             System.out.println("Record Saved");
                             reset();
                             p.close();
              catch (IOException e)
                   System.err.println("Error writing to file");
         public void actionPerformed(ActionEvent ae)
              String str = ae.getActionCommand();
              if(str.equals("OK"))
                   run();
                   //loginframe.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
    }

    hi, thanks for ur reply.
    i visited that url, i was able to know much about xml.
    so now my requirement is DOM.
    but i dont know how to code in my existing file.
    means i want to know what to link all my textfield to xml file.
    can u please help me out. i am confused.
    waiting for ur reply

  • How to store xml data into file in xml format through java program?

    HI Friends,
    Please let me know
    How to store xml data into file in xml format through java program?
    thanks......
    can discuss further at messenger.....
    Avanish Kumar Singh
    Software Engineer,
    Samsung India Development Center,
    Bangalore--560001.
    [email protected]

    Hi i need to write the data from an XML file to a Microsoft SQL SErver database!
    i got a piece of code from the net which allows me to parse th file:
    import java.io.IOException;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.apache.xerces.parsers.SAXParser;
    import java.lang.*;
    public class MySaxParser extends DefaultHandler
    private static int INDENT = 4;
    private static String attList = "";
    public static void main(String[] argv)
    if (argv.length != 1)
    System.out.println("Usage: java MySaxParser [URI]");
    System.exit(0);
    String uri = argv[0];
    try
    XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
    MySaxParser MySaxParserInstance = new MySaxParser();
    parser.setContentHandler(MySaxParserInstance);
    parser.parse(uri);
    catch(IOException ioe)
    ioe.printStackTrace();
    catch(SAXException saxe)
    saxe.printStackTrace();
    private int idx = 0;
    public void characters(char[] ch, int start, int length)
    throws SAXException
    String s = new String(ch, start, length);
    if (ch[0] == '\n')
    return;
    System.out.println(getIndent() + " Value: " + s);
    public void endDocument() throws SAXException
    idx -= INDENT;
    public void endElement(String uri, String localName, String qName) throws SAXException
    if (!attList.equals(""))
    System.out.println(getIndent() + " Attributes: " + attList);
    attList = "";
    System.out.println(getIndent() + "end document");
    idx -= INDENT;
    public void startDocument() throws SAXException
    idx += INDENT;
    public void startElement(String uri,
    String localName,
    String qName,
    Attributes attributes) throws SAXException
    idx += INDENT;
    System.out.println('\n' + getIndent() + "start element: " + localName);
    if (localName.compareTo("Machine") == 0)
    System.out.println("YES");
    if (attributes.getLength() > 0)
    idx += INDENT;
    for (int i = 0; i < attributes.getLength(); i++)
    attList = attList + attributes.getLocalName(i) + " = " + attributes.getValue(i);
    if (i < (attributes.getLength() - 1))
    attList = attList + ", ";
    idx-= INDENT;
    private String getIndent()
    StringBuffer sb = new StringBuffer();
    for (int i = 0; i < idx; i++)
    sb.append(" ");
    return sb.toString();
    }// END PRGM
    Now , am not a very good Java DEv. and i need to find a soln. to this prob within 1 week.
    The next step is to write the data to the DB.
    Am sending an example of my file:
    <Start>
    <Machine>
    <Hostname> IPCServer </Hostname>
    <HostID> 80c04499 </HostID>
    <MachineType> sun4u [ID 466748 kern.info] Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 360MHz) </MachineType>
    <CPU> UltraSPARC-IIi at 360 MHz </CPU>
    <Memory> RAM : 512 MB </Memory>
    <HostAdapter>
    <HA> kern.info] </HA>
    </HostAdapter>
    <Harddisks>
    <HD>
    <HD1> c0t0d0 ctrl kern.info] target 0 lun 0 </HD1>
    <HD2> ST38420A 8.2 GB </HD2>
    </HD>
    </Harddisks>
    <GraphicCard> m64B : PCI PGX 8-bit +Accel. </GraphicCard>
    <NetworkType> hme0 : Fast-Ethernet </NetworkType>
    <EthernetAddress> 09:00:30:C1:34:90 </EthernetAddress>
    <IPAddress> 149.51.23.140 </IPAddress>
    </Machine>
    </Start>
    Note that i can have more than 1 machines (meaning that i have to loop thru the file to be able to write to the DB)
    Cal u tellme what to do!
    Even better- do u have a piece of code that will help me understand and implement the database writing portion?
    I badly need help here.
    THANX

  • How to Dump XML data into table

    Hi All,
    We have one schema on a server.
    We have created the same schema with only table structures on another new server.
    Now we got the data from the original schema as XML files corresponding to each table.
    For Example, we have Employee table created newly on a new server. Now we have the XML file which has Employee data. We have to dump this XML data into new EMPLOYEE table.
    We have to dump these XML files data into corresponding tables.
    How can we achieve this?
    Please help me..
    Thanks in advance

    Look at this example:
    Assume you have the following XML in a tempxml table (tempxml could be an external table):
    create table tempxml (xml xmltype);
    insert into tempxml values (xmltype(
    '<?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <EMPNO>7369</EMPNO>
      <ENAME>SMITH</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7902</MGR>
      <HIREDATE>17-DEC-80</HIREDATE>
      <SAL>800</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7499</EMPNO>
      <ENAME>ALLEN</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>20-FEB-81</HIREDATE>
      <SAL>1600</SAL>
      <COMM>300</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7521</EMPNO>
      <ENAME>WARD</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>22-FEB-81</HIREDATE>
      <SAL>1250</SAL>
      <COMM>500</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7566</EMPNO>
      <ENAME>JONES</ENAME>
      <JOB>MANAGER</JOB>
      <MGR>7839</MGR>
      <HIREDATE>02-APR-81</HIREDATE>
      <SAL>2975</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7654</EMPNO>
      <ENAME>MARTIN</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>28-SEP-81</HIREDATE>
      <SAL>1250</SAL>
      <COMM>1400</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7698</EMPNO>
      <ENAME>BLAKE</ENAME>
      <JOB>MANAGER</JOB>
      <MGR>7839</MGR>
      <HIREDATE>01-MAY-81</HIREDATE>
      <SAL>2850</SAL>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7782</EMPNO>
      <ENAME>CLARK</ENAME>
      <JOB>MANAGER</JOB>
      <MGR>7839</MGR>
      <HIREDATE>09-JUN-81</HIREDATE>
      <SAL>2450</SAL>
      <DEPTNO>10</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7788</EMPNO>
      <ENAME>SCOTT</ENAME>
      <JOB>ANALYST</JOB>
      <MGR>7566</MGR>
      <HIREDATE>19-APR-87</HIREDATE>
      <SAL>3000</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7839</EMPNO>
      <ENAME>KING</ENAME>
      <JOB>PRESIDENT</JOB>
      <HIREDATE>17-NOV-81</HIREDATE>
      <SAL>5000</SAL>
      <DEPTNO>10</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7844</EMPNO>
      <ENAME>TURNER</ENAME>
      <JOB>SALESMAN</JOB>
      <MGR>7698</MGR>
      <HIREDATE>08-SEP-81</HIREDATE>
      <SAL>1500</SAL>
      <COMM>0</COMM>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7876</EMPNO>
      <ENAME>ADAMS</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7788</MGR>
      <HIREDATE>23-MAY-87</HIREDATE>
      <SAL>1100</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7900</EMPNO>
      <ENAME>JAMES</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7698</MGR>
      <HIREDATE>03-DEC-81</HIREDATE>
      <SAL>950</SAL>
      <DEPTNO>30</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7902</EMPNO>
      <ENAME>FORD</ENAME>
      <JOB>ANALYST</JOB>
      <MGR>7566</MGR>
      <HIREDATE>03-DEC-81</HIREDATE>
      <SAL>3000</SAL>
      <DEPTNO>20</DEPTNO>
    </ROW>
    <ROW>
      <EMPNO>7934</EMPNO>
      <ENAME>MILLER</ENAME>
      <JOB>CLERK</JOB>
      <MGR>7782</MGR>
      <HIREDATE>23-JAN-82</HIREDATE>
      <SAL>1300</SAL>
      <DEPTNO>10</DEPTNO>
    </ROW>
    </ROWSET>'));You can insert into an empty EMP2 table this way:
    SQL> insert into emp2
      2  select myemp.empno, myemp.ename, myemp.job, myemp.mgr,
      3         to_date(myemp.hiredate,'dd-mon-yy'), myemp.sal,
      4         myemp.comm, myemp.deptno
      5  from tempxml x, xmltable('/ROWSET/ROW'
      6                           PASSING x.xml
      7                           COLUMNS
      8                             empno number PATH '/ROW/EMPNO',
      9                             ename varchar2(10) PATH '/ROW/ENAME',
    10                             job   varchar2(9) PATH '/ROW/JOB',
    11                             mgr   number PATH '/ROW/MGR',
    12                             hiredate varchar2(9) PATH '/ROW/HIREDATE',
    13                             sal    number PATH '/ROW/SAL',
    14                             comm   number PATH '/ROW/COMM',
    15                             deptno number PATH '/ROW/DEPTNO'
    16                            ) myemp;
    14 rows created.
    SQL> select * from emp2;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.Max
    http://oracleitalia.wordpress.com

  • How to store XML data into Oracle Table

    I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is:
    C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml
    <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2263)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
    at testInsert.main(testInsert.java:8)
    Here is my xml file:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    </ROW>
    <ROW num="2">
    <DEPTNO>20</DEPTNO>
    <DNAME>RESEARCH</DNAME>
    <LOC>DALLAS</LOC>
    </ROW>
    <ROW num="3">
    <DEPTNO>30</DEPTNO>
    <DNAME>SALES</DNAME>
    <LOC>CHICAGO</LOC>
    </ROW>
    <ROW num="4">
    <DEPTNO>40</DEPTNO>
    <DNAME>OPERATIONS</DNAME>
    <LOC>BOSTON</LOC>
    </ROW>
    </ROWSET>
    and here is structure of table:
    Name Null? Type
    DEPTNO NOT NULL NUMBER(2)
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    and here is my Java Code:
    import java.sql.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert{
         public static void main(String[] args) throws SQLException{
              Connection conn = getConnection();
              OracleXMLSave sav = new OracleXMLSave(conn,"scott.tmp_dept");
              sav.insertXML(args[0]);
              sav.close();
              conn.close();
         private static Connection getConnection()throws SQLException{
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@amt-ebdev01:1521:mydept","scott","tiger");
              return conn;
    Could you help me ? Thanks !

    The problem is that you need to pass avalid URL , Document...
    Please try this code instead:
    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert
    public static void main(String[] args) throws SQLException{
    Connection conn = getConnection();
    OracleXMLSave sav = new OracleXMLSave(conn,"scott.temp_dept");
    URL url = createURL(args[0]);
    sav.insertXML(url);
    sav.close();
    conn.close();
    private static Connection getConnection()throws SQLException{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dlsun1982:1521:jwxdk9i","scott","tiger");
    return conn;
    // Helper method to create a URL from a file name
    static URL createURL(String fileName)
    URL url = null;
    try
    url = new URL(fileName);
    catch (MalformedURLException ex)
    File f = new File(fileName);
    try
    String path = f.getAbsolutePath();
    // This is a bunch of weird code that is required to
    // make a valid URL on the Windows platform, due
    // to inconsistencies in what getAbsolutePath returns.
    String fs = System.getProperty("file.separator");
    if (fs.length() == 1)
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    url = new URL(path);
    catch (MalformedURLException e)
    System.out.println("Cannot create url for: " + fileName);
    System.exit(0);
    return url;

  • How to convert XML data into binary data (opaque data)

    Hi,
    I am trying to develop a process that delivers files after reading data from a database.
    However, it is required not to deliver the data immediately. We want to perform some checks before the files get written.
    So the way we want to design this is,
    1. Read data from database (or any other input). The data is in XML format (this is a requirement, as in general, we have xml data)
    2. This data is written, opaquely, to a JMS queue that can store binary data, along with what is the filename of the file that would be written (filename is passed using JMS Headers)
    3. When required, another process reads the JMS queue's binary data, and dumps into a file
    The reason I want to use opaque data while inserting in the JMS queue is, that enables me to develop a single process in Step 3 that can write any file, irrespective of the format.
    My questions are
    1. How to convert the xml data to opaque data. In BPEL I may use a embedded java, but how about ESB. Any other way....?
    2. how to pass filename to the jms queue, when payload is opaque. Can I use a header attribute...custom attributes?
    3. Which jms message type is better for this kind of requirement - SYS.AQ$_JMS_BYTES_MESSAGE or SYS.AQ$_JMS_STREAM_MESSAGE

    Ana,
    We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
    Let me know if this helps.

  • Helped, how to load xml data into database

    Hi,
    Given a DTD, can the XML SQL Utility generate
    the database schema?
    I currently have the dtd file to define
    the data type and xml data and I am looking
    for ways of how the XML/DTD can be loaded
    into the oracle db.
    Any suggestions/recommendations are
    appreciated.
    Thanks,
    Judy
    null

    You could check out this web site:
    http://www.rpbourret.com/xml/XMLAndDatabases.htm#software
    where you can find a list of products that can translate a DTD to a relational schema. Also, there are several technical papers that discuss algorithms to carry out this translation. FYI, We have implemented a similar system,and testing it out.
    null

  • How to load xml data into a table

    Hi,
    i am a newbie. I want to insert the data of xml file into a table. I am doing this using XSU api for java.
    I am using oracle 9i and jdk 1.7.
    I am using OracleXmlSave class.
    but i am getting following error.
    java.lang.NoClassDefFoundError: oracle/jdbc2/Clob
    Please help in this regard. this is my first thread.
    thanks.
    Edited by: 979682 on Jan 3, 2013 3:39 AM

    Hi,
    You can insert XML data from XML file to Oracle database by this script :
    Hi,
    For reading and inserting the data from XML file to Oracle Database :
    1. CREATE A BLANK TABLE with same structure as XML file :
    select * from xml_test
    2. SELECT QUERY DIRECTLY ON XML FILE :
    SELECT XMLTYPE(bfilename('TEST_DIR', 'data_file.xml'), nls_charset_id('UTF8')) xml_data FROM dual
    3. CREATE ORACLE DIRECTORY AND PLACE XML FILE IN THIS DIRECTORY LOCATION:
    --CREATE DIRECTORY TEST_DIR as '/oracle/test';
    --grant all on directory TEST_DIR to public;
    4. INSERT THE XML DATA IN ORACLE TABLE:
    INSERT INTO xml_test(column1,coumn2)
    WITH t AS (SELECT XMLTYPE(bfilename('TEST_DIR', 'attachment.xml'), nls_charset_id('UTF8')) xml_col FROM dual)
    SELECT
    extractValue(value(x),'/ROW/COLUMN1') column1
    ,extractValue(value(x),'ROW/COLUMN2') column2
    FROM t,TABLE(XMLSequence(extract(t.xml_col,'/ROWSET/ROW'))) x;
    I have assumed a table with 2 columns.
    Regards,
    Rohit Chaudhari
    [email protected]

  • How to load xml data into a database table....

    Hi All,
    Iam new to this forum.I have an xmldoc table of xmltype(datatype).Iam able to insert xml data to it.I have another table called new_books.sql:
    CREATE TABLE NEW_BOOKS
    TITLE          VARCHAR2(255) NOT NULL,
    LINK          VARCHAR2(80) NULL,
    PUBLISHER     VARCHAR2(255) NULL,
    SUBJECT     VARCHAR2(80) NULL,
    PUBDATE     VARCHAR2(40) NULL,
    DESCRIPTION     VARCHAR2(4000) NULL,
    AUTHOR     VARCHAR2(80) NULL,
    PRIMARY      KEY(TITLE)
    Now i want to copy the data in the xmldoc table into the table new_books.sql.Is there any procedure to do that in PL/SQL?
    Given below is the xmlfile:
    - <rdf>
    - <item>
    <title>Enterprise SOA: Designing IT for Business Innovation</title>
    <link>http://safari.oreilly.com/0596102380?a=102682</link>
    <publisher>O'Reilly</publisher>
    <creator>Thomas Mattern</creator>
    <creator>Dan Woods</creator>
    <subject>IT Infrastructure</subject>
    <date>April 2006</date>
    </item>
    </rdf>
    Thanks in Advance,
    Gita.

    Assuming the table xmldoc(of xmltype) has this XML
    SQL> select * from xmldoc;
    SYS_NC_ROWINFO$
    <rdf>
    <item>
    <title>Enterprise SOA: Designing IT for Business Innovation</title>
    <link>http://safari.oreilly.com/0596102380?a=102682</link>
    <publisher>O'Reilly</publisher>
    <creator>Thomas Mattern</creator>
    <creator>Dan Woods</creator>
    <subject>IT Infrastructure</subject>
    <date>April 2006</date>
    </item>
    </rdf>
    SQL> INSERT INTO NEW_BOOKS(TITLE, LINK, PUBLISHER, SUBJECT)
      2  select extractvalue(value(x),'/rdf/item/title') as title,
      3  extractvalue(value(x),'/rdf/item/link') as link,
      4  extractvalue(value(x),'/rdf/item/publisher') as publisher,
      5  extractvalue(value(x),'/rdf/item/subject') as subject
      6  from xmldoc x
      7  ;
    1 row created.

  • How to convert xml data into html format in bpel

    Hi ,
    Can any one tel me how to conevrt xml into html in oracle bpel.
    Does bpel support this functionality or not.
    Regards,
    Ana
    Edited by: user10181991 on Apr 5, 2009 11:16 PM

    Ana,
    We are doing the same thing--using one variable with the schema as the source of the .xsl and assigning the resulting html to another variable--the content body of the email, in our case. I just posted how we did it here: Re: Using XSLT to generate the email HTML body
    Let me know if this helps.

  • How to Post Xml data into interactive form in web dynpro

    Hi,
    I want to be creating the xml source for web dynpro programatically.
    This is because my adobe form is highly dynamic where even the kind of ui elements and the position is decided at runtime.
    It is a highly interactive chart which I am planning.
    I want to then bind this dynamically generated xml to the pdf.
    Let me know your ideas.
    Thanks,
    Harish

    Conclusion from my point of view:
    1) You cannot have this thing interactive if you want to work with all the features of OM, if you want to cover all the details. In that case you need to create some tool for drawing the pictures for you and then only send the picture into the form. If anybody would like to do the changes you would add the table at the bottom of the page where a guy can say something like "chair A move under the big banana B" or "fire Mr. C, remove the position of Mr. C". That is probably the thing I would go for
    2) I am afraid you or your employer do not understand how the Adobe forms work. This is possible, but as I said before, that would be a nightmare for the developer (I cannot tell the price, would start with like 20 MDs).
    3) If you would like to mimic some existing solution and don´t want to buy that, then it´s ok for me. But don´t try to re-create the existing .NET or Java stuff in ABAP. I am skilled Java programmer and I can tell the freedom and the speed of the development is quite different. If the customer/ boss insist on developing such thing, use WEB development, go for PURE JAVA (I would go this way), use Java Connector in a JSP/ J2EE stuff and then incorporate the result into the portal.
    Hope that clarifies the problem a little,
    regards Otto

  • Bringing xml data into flash

    I would like to know how to bring xml data into flash.
    Specifically images that someone can click on the thumbnail and
    view the larger image. please can anyone point me to some tutorials
    or sites that i can start to learn how to do this.
    thanks.

    Hi
    First of all, read every thing you can in Flash Help to get
    to know the different methods of loading XML.
    XML can be loaded with 'built-in' components or parsed in
    Actionscript, the Help files will explain both.
    Next - Google for 'XML Image or Picture Gallery' you'll find
    plenty
    Hope it helps

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • How to Convert internal table data into xml and xml data into internal tab

    Hi Guys,
          I have a requirement  that  i have to convert the internal table data into xml format and viceversa . for my requirement  i came to know that i have to use Transformations concept.  i done the converting the data from internal table into xml data by using standard Tranformations. My Question is 
    1) Can i use same Transformation to convert the xml data into abap internal table. if it is possible then how ???
    2) Is it possible using the standard Transformation  or I have to go for XSLT approach
    Please help me out from this guys,
    Thanks and Regards
    Koti

    Hi Koti,
    This is possible. There is a link. With the help of this link you can convert ABAP data to XML and vice versa.
    Link: http://www.heidoc.net/joomla/index.php?option=com_content&view=article&id=15:sapxslt&catid=22:sap-xslt&Itemid=31

  • How to pass xml data as objects into Database using store procedures

    Hi All,
         I don't have much knowledge on store procedure,can anybody help how to pass the xml as objects in Database using store procedure.
    My Requirement is I have a table with three fields EMPLOYEE is table name and the fields are EMP_ID,EMP_TYPE AND EMP_DET,I have to insert the employees xml data into corresponding fields in the table.
    Input Data
    <ROWSET>
       <ROW>
         <EMP_ID>7000</EMP_ID>
          <EMP_TYPE>TYPE1</EMP_TYPE>
         <EMP_DET>DEP</EMP_DET>
      <ROW>
      <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE2</EMP_TYPE>
        <EMP_DET>DEP2</EMP_DET>
    <ROW>
    <ROW>
         <EMP_ID>7000</EMP_ID>
         <EMP_TYPE>TYPE3</EMP_TYPE>
        <EMP_DET>DEP3</EMP_DET>
    <ROW>
    <ROWSET>
    So each row values has to inserted into resp fields in the table.
    Regards
    Mani

    Do you have a similar structure in your stored procedure ?
    In that case you can simply call the procedure from soa using db adapter and do a mapping to assign the values.

Maybe you are looking for

  • Get ddl? can't see anything

    my query executes well but no results ( I am using a TOAD). What's wrong? select dbms_metadata.get_ddl('VIEW','DBA_SEGMENTS') txt from dual;

  • Dynamic Routing Using Query String (SOAP)

    Hi Folks, Does anyone have any examples on how to do a dynamic routing using a query string from a SOAP Adapter. I know how to get the query string but don't know how to map for dynamic routing. Thanks, AArhyn.

  • Slides or Elements of slides missing

    Hi -- I'm VERY FRUSTRATED! I've been using Captivate for years now --- I just upgraded my machine to a top of the line model running Vista. Because of this, I'm using the trial version of Captivate 3 (my old-reliable Captivate 1 doesn't record audio

  • Recruitment actions -- Actions on same day

    Hi, I have a requirement to configure actions ,which can be executed on the same date. Eg: Initial entry date 01.01.2008      Offer of contract 01.01.2008      Prepare for hiring 01.01.2008 Note:All the actions should exist in actions infotype(4000).

  • Roundcube Test Imap config failed

    Been trying for hours to get webmail working, following ArchWiki. Step 3 of Roundcube Installer errors out: IMAP connect:  NOT OK(Login failed for [email protected] from xxx.44.40.194. Could not connect to ssl://localhost:993: Unknown reason) /var/log