Error in inserting XML document

I'm trying to insert into a table from an HTML form.
Here's the table I'm trying to insert into
TABLE employee
name VARCHAR2(40),
ssnum NUMBER NOT NULL
Note: even though SSNUM is number I take it as a string and I
have a before insert trigger that converts it to number. Works
from SQL plus if entry is number.
Here's the testxsql.html
<html>
<body>
Input your name and ssnumber ..
<form action="testxsql.xsql" method="post">
Name<input type="text" name="name_field" size="30">
SSNUM<input type = "text" name="ssnum_field" size="10">
<input type="submit">
</form>
</body>
</html>
it calls testxsql.xsql which is
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="employee.xsl"?>
<page connection="demo">
<insert table="employee" transform="testxsql.xsl"/>
<content>
<query tag-case="lower" max-rows="5" rowset-element=""
row-element="emp" >
select *
from employee
order by ssnum desc
</query>
</content>
</page>
and testxsql.xsl is
<?xml version = '1.0'?>
<ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:for-each select="request">
<ROW>
<NAME><xsl:value-of select="name_field"/></NAME>
<SSNUM><xsl:value-of select="ssnum_field"/></SSNUM>
<SOURCE>User-Submitted</SOURCE>
</ROW>
</xsl:for-each>
</ROWSET>
I get the following error while trying to insert
XSQL-015: Error inserting XML Document
invalid LABEL name in XML doc-
If I remove the insert tag, the query portion works fine.
I'm new to XML so I've already pulled all the hair that I can
muster. Thanks
null

Kumar Pandey (guest) wrote:
: I'm trying to insert into a table from an HTML form.
: Here's the table I'm trying to insert into
: TABLE employee
: name VARCHAR2(40),
: ssnum NUMBER NOT NULL
: Note: even though SSNUM is number I take it as a string and I
: have a before insert trigger that converts it to number. Works
: from SQL plus if entry is number.
: Here's the testxsql.html
: <html>
: <body>
: Input your name and ssnumber ..
: <form action="testxsql.xsql" method="post">
: Name<input type="text" name="name_field"
size="30">
: SSNUM<input type = "text" name="ssnum_field"
size="10">
I'm using apache web and JServ and 8i as db
: <input type="submit">
: </form>
: </body>
: </html>
: it calls testxsql.xsql which is
: <?xml version="1.0"?>
: <?xml-stylesheet type="text/xsl" href="employee.xsl"?>
: <page connection="demo">
: <insert table="employee" transform="testxsql.xsl"/>
: <content>
: <query tag-case="lower" max-rows="5" rowset-element=""
: row-element="emp" >
: select *
: from employee
: order by ssnum desc
: </query>
: </content>
: </page>
: and testxsql.xsl is
: <?xml version = '1.0'?>
: <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
: <xsl:for-each select="request">
: <ROW>
: <NAME><xsl:value-of select="name_field"/></NAME>
: <SSNUM><xsl:value-of select="ssnum_field"/></SSNUM>
: <SOURCE>User-Submitted</SOURCE>
: </ROW>
: </xsl:for-each>
: </ROWSET>
: I get the following error while trying to insert
: XSQL-015: Error inserting XML Document
: invalid LABEL name in XML doc-
: If I remove the insert tag, the query portion works fine.
: I'm new to XML so I've already pulled all the hair that I can
: muster. Thanks
null

Similar Messages

  • ORA-00600: inserting xml document

    I am getting an this error when inserting an xml document into Oracle.
    The schema below and sample xml document reproduce the problem.
    If I move the element named "theID" from the type "BaseObjectType"
    to "NextObjectType" and remove the extension declaration in this type
    all works ok. complete error is:
    ORA-00600: internal error code, arguments: [qmxConvUnkType], [], [], [], [],
    Schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
    targetNamespace="http://www.x.com/test"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tes="http://www.x.com/test">
    <xs:complexType name="BaseObjectType" abstract="true">
    <xs:sequence>
    <xs:element name="theID" type="xs:string">
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NextObjectType" abstract="true">
    <xs:complexContent>
    <xs:extension base="tes:BaseObjectType">
    <xs:sequence>
    <xs:element name="title" type="xs:string">
    </xs:element>
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="RBaseType" abstract="true">
    <xs:complexContent>
    <xs:restriction base="tes:NextObjectType">
    <xs:sequence>
    <xs:element name="theID" type="xs:string"/>
    <xs:element name="title" type="xs:string"/>
    </xs:sequence>
    </xs:restriction>
    </xs:complexContent>
    </xs:complexType>
    <xs:complexType name="RType">
    <xs:complexContent>
    <xs:extension base="tes:RBaseType">
    <xs:sequence>
    <xs:element name="theName" type="xs:string">
    </xs:element>     
    </xs:sequence>
    </xs:extension>
    </xs:complexContent>
    </xs:complexType>
    <xs:element name="RObject" type="tes:RType"/>
    </xs:schema>
    Sample xml document:
    <?xml version="1.0" encoding="UTF-8"?>
    <RObject xmlns="http://www.x.com/test"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://localhost:8080:/test.xsd">
    <theID xmlns="">123</theID>
    <title xmlns="">title</title>
    <theName xmlns="">name</theName>
    </RObject>
    Register Schema call:
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    SCHEMAURL => 'http://localhost:8080/test.xsd',
    SCHEMADOC => bfilename('TMP3','test.xsd'),
    LOCAL => TRUE,
    GENTYPES => TRUE,
    GENTABLES => TRUE,
    CSID => nls_charset_id('AL32UTF8'));
    END;
    Insert xml document call:
    insert into "RObject566_TAB" values
    (XMLType(bfilename('TMP3','test.xml'),nls_charset_id('AL32UTF8')));
    Changing NextObjectType to this gets insert to work:
    <xs:complexType name="NextObjectType" abstract="true">
    <xs:sequence>
    <xs:element name="theID" type="xs:string"/>
    <xs:element name="title" type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    Anyone else seen this?
    jcl.

    BTW: This is with Oracle 10.2.0

  • Error when inserting xml with xsi:noNamespaceSchemaLocation

    Hello,
    Hopefully this isn't a stupid question....
    I am currently using Oracle 9.2.0.6.0 to try out XML.
    I haven't been able to get our DBAs to set up XML DB in its entirety so I just have the basics, i.e. I have access to the xmltype object but none of the packages like DBMS_SCHEMA and DBMS_XDB. Therefore, I haven't been able to register any schemas in the database.
    So what I'd like to know is why do I get an ORA-21700 error when I try to load an xml document which has the 'xsi:noNamespaceSchemaLocation' attribute'. If I take this out of the XML document, it loads.
    From my initial reading, I got the impression that registering a schema in order to validate documents was an optional, although probably an ideal, step to take.
    So another way of phrasing this subject might be: can one insert xml documents without the use of a schema?
    The example code is shown below.
    dbase> INSERT INTO MY_TABLE( id , message_type , status , rcvd_time, filename , xmlcol)
    2 VALUES ( 1, 0 , 'RECEIVED', sysdate , 'tempfilename' ,
    3 xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    4 xsi:noNamespaceSchemaLocation = "ExampleXML.xsd">
    5 <tag1>
    6 <tag2 attr1="something">Some data
    7 </tag2>
    8 </tag1>
    9 </ExampleXML>')
    10 );
    xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    ERROR at line 3:
    ORA-21700: object does not exist or is marked for delete
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    dbase> ed
    Wrote file afiedt.buf
    1 INSERT INTO MY_TABLE ( id , message_type , status , rcvd_time, filename , xmlcol)
    2 VALUES ( 1, 0 , 'RECEIVED', sysdate , 'tempfilename' ,
    3 xmltype('<ExampleXML xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
    4 >
    5 <tag1>
    6 <tag2 attr1="something">Some data
    7 </tag2>
    8 </tag1>
    9 </ExampleXML>')
    10* )
    dbase> /
    1 row created.
    The xmlcol column was created simply as an xmltype column.

    Basically using XMLType without XML DB is almost impossible in 9.2.x. Please have the DBA's install XML DB by running the script $ORACLE_HOME/rdbms/admin/catqm.sql. They can follow the installing XDB instuctions in the XML DB Developer's guide.
    What is actually happening here is that the PARSER is hard wired to always check is a document that contains an noNamespaceSchemaLocation or schemaLocation tag is associated with an XML Schema that has been registered with Oracle XML DB. If is is, special action is takem, if it isn't then no special action is taken. Unfortunately for various arcane technical reasons if the the XDB repository is not present the check fails totally. Even if we fixed this bug, which has been marked not feasible to fix in the past, there are many other issues with the inbuilt XML technology having dependancies on the presence of the XML DB repository and XDB database user.
    So the net/net is don't use XMLType or any XML related features in 9.2.x or later unless XML DB is installed. It is extremenly likely at this point in time that XML DB will become a mandatory component of the next release of the database. At that point you will no longer have an option. It will be automatically installed when a database is created or updated and there will be no way of un-installing it.

  • Heap space error while creating XML document from Resultset

    I am getting Heap space error while creating XML document from Resultset.
    It was working fine from small result set object but when the size of resultset was more than 25,000, heap space error
    I am already using -Xms32m -Xmx1024m
    Is there a way to directly write to xml file from resultset instead of creating the whole document first and then writing it to file? Code examples please?
    here is my code:
    stmt = conn.prepareStatement(sql);
    result = stmt.executeQuery();
    result.setFetchSize(999);
    Document doc = JDBCUtil.toDocument(result, Application.BANK_ID, interfaceType, Application.VERSION);
    JDBCUtil.write(doc, fileName);
    public static Document toDocument(ResultSet rs, String bankId, String interfaceFileType, String version)
        throws ParserConfigurationException, SQLException {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.newDocument();
            Element results = doc.createElement("sims");
            results.setAttribute("bank", bankId);
            results.setAttribute("record_type", "HEADER");
            results.setAttribute("file_type", interfaceFileType);
            results.setAttribute("version", version);
            doc.appendChild(results);
            ResultSetMetaData rsmd = rs.getMetaData();
            int colCount = rsmd.getColumnCount();
            String columnName="";
            Object value;
            while (rs.next()) {
                Element row = doc.createElement("rec");
                results.appendChild(row);
                for (int i = 1; i <= colCount; i++) {
                    columnName = rsmd.getColumnLabel(i);
                    value = rs.getObject(i);
                    Element node = doc.createElement(columnName);
                    if(value != null)
                        node.appendChild(doc.createTextNode(value.toString()));
                    else
                        node.appendChild(doc.createTextNode(""));
                    row.appendChild(node);
            return doc;
    public static void write(Document document, String filename) {
            //long start = System.currentTimeMillis();
            // lets write to a file
            OutputFormat format = new OutputFormat(document); // Serialize DOM
            format.setIndent(2);
            format.setLineSeparator(System.getProperty("line.separator"));
            format.setLineWidth(80);
            try {
                FileWriter writer = new FileWriter(filename);
                BufferedWriter buf = new BufferedWriter(writer);
                XMLSerializer FileSerial = new XMLSerializer(writer, format);
                FileSerial.asDOMSerializer(); // As a DOM Serializer
                FileSerial.serialize(document);
                writer.close();
            } catch (IOException ioe) {
                ioe.printStackTrace();
            //long end = System.currentTimeMillis();
            //System.err.println("W3C File write time :" + (end - start) + "  " + filename);
        }

    you can increase your heap size..... try setting this as your environment variable.....
    variable: JAVA_OPTS
    value: -Xms512m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m

  • Error while getting xml document  with default connection in 8iJServer

    I had used GZIP utility to zip and store the document in
    the CLOB. If i use thin drivers and GZIP to retieve this document it works fine.
    instead of thin drivers if i use oracle8iJserver defalut
    connection i get the follwing error
    :Error while getting xml document Not in GZIP format.
    your response is appreciated.
    thanks
    sanjay.

    Hi Yepin Jin,
    I am facing the same issue did you solved it?
    Regards,
    Orlando Covault

  • Very urgent help needed- Error while passing XML document to Oracle stored

    Hi !
    I have been struggling a lot to call Oracle 9i stored procedure passing Stringbuilder object type from ASP.NET
    I am using Visual Studio 2008 Professional, OS: Windows XP and Oracle: 9.2.0.1.0
    Following is the procedure:
    CREATE or REPLACE PROCEDURE loadCompanyInfo (clobxml IN clob) IS
    -- Declare a CLOB variable
    ciXML clob;
    BEGIN
    -- Store the Purchase Order XML in the CLOB variable
    ciXML := clobxml;
    -- Insert the Purchase Order XML into an XMLType column
    INSERT INTO companyinfotbl (companyinfo) VALUES (XMLTYPE(ciXML));
    commit;
    --Handle the exceptions
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20101, 'Exception occurred in loadCompanyInfo procedure :'||SQLERRM);
    END loadCompanyInfo ;
    And following is the ASP.net code:
    StringBuilder b = new StringBuilder();
    b.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
    b.Append("<item>");
    b.Append("<price>500</price>");
    b.Append("<description>some item</description>");
    b.Append("<quantity>5</quantity>");
    b.Append("</item>");
    //Here you'll have the Xml as a string
    string myXmlString1 = b.ToString();
    //string result;
    using (OracleConnection objConn = new OracleConnection("Data Source=testdb; User ID=testuser; Password=pwd1"))
    OracleCommand objCmd = new OracleCommand();
    objCmd.Connection = objConn;
    objCmd.CommandText = "loadCompanyInfo";
    objCmd.CommandType = CommandType.StoredProcedure;
    //OracleParameter pmyXmlString1 = new OracleParameter("pmyXmlString1", new OracleString(myXmlString1));
    objCmd.Parameters.Add("myXmlString1", OracleType.clob);
    objCmd.Parameters.Add(myXmlString1).Direction = ParameterDirection.Input;
    //objCmd.Parameters.Add("result", OracleType.VarChar).Direction = ParameterDirection.Output;
    try
    objConn.Open();
    objCmd.ExecuteNonQuery();
    catch (Exception ex)
    Label1.Text = "Exception: {0}" + ex.ToString();
    objConn.Close();
    When I am trying to execute it, I am getting the following error:
    Exception: {0}System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'LOADCOMPANYINFO' ORA-06550: line 1, column 7: PL/SQL: Statement ignored at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery() at Default.Button1Click(Object sender, EventArgs e)
    I understand from this that the .net type is not the correct one, but I am not sure how to correct it. I could not find any proper example in any documentation that I came across. Most of the examples give information on how to read but not how to insert XML into Oracle table by calling Stored Procedure.
    Can you please help me to solve this problem? I hope that you can help solve this.
    Also, can you please give me an example of passing XML document XMLdocument to Oracle Stored procedure.
    In both the cases, if you can provide the working code then it would be of great help.
    Thanks,

    Hi ,
    Additional to the Above error details my BPEL code looks like this:
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <partnerLinks>
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>
    Kindly help if anyone has faced this Issue before.
    Regards,
    Rakshitha

  • Inserting XML document into XDB fails with can't convert to OPAQUE

    Hi,
    When I try to insert a document using oracle 9.2.0.5 client software into a 9.2.0.5 database, with the following code:
    void insertDocument(String document) {
    XMLType xt = XMLType.createXML(connection, document);
    PreparedStatement ps = connection.prepareStatement("insert into xmldocuments values(?)");
    ps.setObject(1, xt);
    ps.executeUpdate();
    The setObject function always throws an exception (after a very long time) with:
    java.sql.SQLException: Fail to convert to internal representation: OPAQUE()
    This also fails when we use the InputStream and org.w3c.xml.Document variants.
    We use the OCI driver, otherwise we get errors retrieving the documents from XMLDB.
    What is going wrong here?

    David,
    If you search through the historical data in this list there are previous post regarding opaque.
    These may be useful. Possibly your reaching the size limit.

  • How to get ALL validate-errors while insert xml-file into xml_schema_table

    How to get all validate-errors while using insert into xml_schema when having a xml-instance with more then one error inside ?
    Hi,
    I can validate a xml-file by using isSchemaValid() - function to get the validate-status 0 or 1 .
    To get a error-output about the reason I do validate
    the xml-file against xdb-schema, by insert it into schema_table.
    When more than one validate-errors inside the xml-file,
    the exception shows me the first error only.
    How to get all errors at one time ?
    regards
    Norbert
    ... for example like this matter:
    declare
         xmldoc CLOB;
         vStatus varchar
    begin     
    -- ... create xmldoc by using DBMS_XMLGEN ...
    -- validate by using insert ( I do not need insert ;-) )      
         begin
         -- there is the xml_schema in xdb with defaultTable XML_SCHEMA_DEFAULT_TABLE     
         insert into XML_SCHEMA_DEFAULT_TABLE values (xmltype(xmldoc) ) ;
         vStatus := 'XML-Instance is valid ' ;
         exception
         when others then
         -- it's only the first error while parsing the xml-file :     
              vStatus := 'Instance is NOT valid: '||sqlerrm ;
              dbms_output.put_line( vStatus );      
         end ;
    end ;

    If I am not mistaken, the you probably could google this one while using "Steven Feuerstein Validation" or such. I know I have seen a very decent validation / error handling from Steven about this.

  • Error: No valid XML document received*_

    Hi All,
    We are connecting our CCMS system to NetWeaver J2EE engine on which E-Sourcing is running.
    For this we registered java component and hosts in cen.
    But we are getting error as : No valid XML document received
    Please can anyone tell me how to overcome this error.
    Thank you .
    Regards
    Mahesh

    Hi,
    Please re-read the answer from Marc carefully.  He was in the exact same situation as yours: 
    - Monitored system: NW CE 7.1
    - CEN: NW 7.01 (same as NW 7.0 EhP1)
    The link you posted is for CEN with NW 7.3 and monitored systems from NW 7.02 (and up).  Read the paragraph below the Caution sign:
    If you want to centrally monitor any system with a central monitoring system with release SAP NetWeaver 7.0, this procedure is not applicable. In this case, follow the procedure described in the newest Monitoring Setup Guide for SAP NetWeaver 7.0 instead. You can obtain the Monitoring Setup Guide at the Internet address service.sap.com/operationsnw70 in the Monitoring area.
    You should look for (and follow) the right Monitoring Setup Guide as mentioned.
    Regards,
    Dao
    Edited by: Dao Ha on Sep 19, 2011 10:38 AM

  • Error while building xml document

    Hi Everyone,
    I have a problem while building xml document.
    I have developed my java files using IBM Eclipse 3.0 and i had no problem while executing the files.
    But while i am trying to execute the same code in jdk/bin, xml document is not working..
    No error encountered while compiling but while executing when i try to print the xml string it just gives the root element name like [root : null]
    Can anyone suggest some solution?

    To the values element add xmlns:xsi and xsi:noNamespaceSchemaLocation.
    <values xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
    xsi:noNamespaceSchemaLocation="file:///c:/schema.xsd">schema.xsd is schema file.

  • Error while inserting xml into database

    Hi,
    I'm trying to use the sample application available on OTN site i.e. Simple Bulk Loader Sample Application which inserts a xml more than 4k in xmltype.
    But I am getting this error while using it from JDeveloper
    Here is the error :
    XMLLoader: Uploaded File write to clob c:\temp\sampleXMLFiles\PPF.XML
    XMLLoader: Uploaded File after setc:\temp\sampleXMLFiles\PPF.XML
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    Error at line 0
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    void oracle.jdbc.dbaccess.DBError.throwSqlException(java.lang.String, java.lang.String, int)DBError.java:134
    void oracle.jdbc.ttc7.TTIoer.processError()
    Process exited with exit code 0.
    Any ideas !!!
    Thanks
    -Rajeev

    Hi,
    Thanks for the reply.
    Actually it all started with this error while runnning the code in Jdeveloper
    SimpleBulkLoader.doBulkLoad- The system cannot find the path specified. IO:FileNotFound Exception
    Then while debugging I thought its giving error because of writer.close( ); in one of the writeToClob API in BaseApplication.java. So I commented it and then started getting this error which I originally posted
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    Error at line 0
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    But now after I uncommented writer.close() and debugged the application again in JDeveloper, I see it reads the xml and keeps it in buffer properly but in the end it throws SQLException "No more data to read from socket" and in turn throws "The system cannot find the path specified. IO:FileNotFound Exception"
    I have no idea what's going on ??
    Thanks
    -Rajeev

  • Problem in inserting XML document

    Give XML DTD :
    <!ELEMENT a (b, c)>
    <!ELEMENT b (#PCDATA)>
    <!ELEMENT c (d, e)>
    <!ELEMENT d (#PCDATA)>
    <!ELEMENT e (#PCDATA)>
    I made schema at Oracle8i as this:
    create type c_t
    as object (d varchar2(3),
    e varchar2(3));
    create table a (
    b varchar2(3),
    c c_t,
    constraint b_pk primary key (b));
    And the XML document to insert into DB is as this:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <b>"100"</b>
    <c><d>"aaa"</d><e>"abc"</e></c>
    </ROW>
    <ROW>
    <b>"200"</b>
    <c><d>"bbb"</d><e>"def"</e></c>
    </ROW>
    </ROWSET>
    Using Oracle8i's XML-JAVA library interface,
    I tried to insert the XML document into the DB table, but JAVA runtime exception occurred says "java.lang.NoSuchMethodError: oracle.jdbc.oci8.OCIDBAccess: method initObjectFields(Loracle/jdbc/dbaccess/DBColumn;[BI)V not found".
    How can I solve this problem?
    null                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    try calling dbms_xmlgen.setrowsettag(qryctx,'siteMap') ;
    before retrieving the result with DBMS_XMLGEN.getxmltype (qryctx);

  • Error using SOAPRunner:  XML document must have top level element

    Hi all,...................xMII 11.5.3 b66
    I am attempting to consume a BLS transaction as a web service from a J2EE app. 
    When I test it with http://naholldo31020/Lighthammer/SOAPRunner/Amy/GetListOfPlants I am getting an error message from the browser.  The BLS transaction works fine when called from a Query template.  What am I missing?
    The XML page cannot be displayed
    Cannot view XML input using style sheet.
    Please correct the error and then click the Refresh button, or try again later.
    XML document must have a top level element. Error processing
    resource 'http://naholldo31020/Lighthammer/SOAPRunner/Amy/GetL...
    WSDL from WSDLGen...
    <?xml version="1.0" encoding="UTF-8" ?>
    - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:s="http://www.w3.org/2001/XMLSchema"
    xmlns:s0="http://www.sap.com/xMII"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
    - <!--  Types
      -->
    - <types>
    - <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
    - <s:complexType name="InputParams">
    - <s:sequence id="InputSequence">
      <s:element maxOccurs="1" minOccurs="0" name="RequestXML" type="s:Xml" />
      <s:element maxOccurs="1" minOccurs="0" name="RowCount" type="s:long" />
      <s:element maxOccurs="1" minOccurs="0" name="RowSkips" type="s:long" />
      <s:element maxOccurs="1" minOccurs="0" name="Table" type="s:string" />
      </s:sequence>
      </s:complexType>
    - <s:element name="XacuteRequest">
    - <s:complexType>
    - <s:sequence>
      <s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
      <s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
      </s:sequence>
      </s:complexType>
      </s:element>
    - <s:complexType name="Rowset">
    - <s:sequence>
      <s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
      </s:sequence>
      <s:attribute name="Message" type="s:string" />
      </s:complexType>
    - <s:complexType name="Row">
    - <s:sequence id="RowSequence">
      <s:element maxOccurs="1" minOccurs="1" name="ErrorMessage" type="s:string" />
      <s:element maxOccurs="1" minOccurs="1" name="OutputXML" type="s:string" />
      </s:sequence>
      </s:complexType>
    - <s:element name="XacuteResponse">
    - <s:complexType>
    - <s:sequence>
      <s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      </types>
    - <!--  Messages
      -->
    - <message name="XacuteSoapIn">
      <part element="s0:XacuteRequest" name="parameters" />
      </message>
    - <message name="XacuteSoapOut">
      <part element="s0:XacuteResponse" name="parameters" />
      </message>
    - <!--  Ports
      -->
    - <portType name="XacuteWSSoap">
    - <operation name="Xacute">
      <input message="s0:XacuteSoapIn" />
      <output message="s0:XacuteSoapOut" />
      </operation>
      </portType>
    - <!--  Bindings
      -->
    - <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="Xacute">
      <soap:operation soapAction="http://www.sap.com/xMII" style="document" />
    - <input>
      <soap:body use="literal" />
      </input>
    - <output>
      <soap:body use="literal" />
      </output>
      </operation>
      </binding>
    - <!--  Service mapping
      -->
    - <service name="XacuteWS">
    - <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
      <soap:address location="http://naholldo31020/Lighthammer/SOAPRunner/Amy/GetListOfPlants" />
      </port>
      </service>
      </definitions>

    Hi Amy,
    here is an example how you can call a WS via http GET:
    http://<server>/Lighthammer/Runner?Transaction=<path_to_your_TRX>&XacuteLoginName=YourAccount&XacuteLoginPassword=yoursecret&outputparameter=*
    Please note you do not need to use credentials in case you calling localhost.
    I think in your case this should be the right url:
    http://naholldo31020/Lighthammer/Runner?Transaction=Amy/GetListOfPlants&XacuteLoginName=YourAccount&XacuteLoginPassword=yoursecret&outputparameter=*
    Please change parameters for
    - XacuteLoginName
    - XacuteLoginPassword
    - outputparameter (you can specify * or one of your transaction output parameter)

  • Error when emailing XML document

    Hi there
    I am trying to email an XML document to an external vendor by using the CL_DOCUMENT_BCS class.  The email is sent successfully and I receive it in the relevant mailbox.  To make it an XML document, I move 'XML' to the I_TYPE parameter of the class.  This sends it perfectly as an XML document.
    The problem occurs when I receive the email and open the attachment.  When I open the attachment, I get the error "Whitespace is not allowed at this location".  To rectify this problem, I open the XML attachment in notepad, concatenate these lines by deleting the return characters and I save the file and open it again.  It then displays perfectly.
    When I send the email as a normal text document and I change the extension manually to 'XML', the XML can be viewed perfectly. 
    Can anyone assist in rectifying this so that there is no manual intervention?
    Kind Regards
    Gustav Coleske

    Raja
    The code is as follows:
    FORM send_data_via_email .
      DATA:   new_object_id LIKE sofolenti1-object_id,
              l_idx         LIKE sy-tabix.
    All activities done via facade CL_BCS!
      DATA: send_request              TYPE REF TO cl_bcs.
      DATA: text                      TYPE bcsy_text.
      DATA: document                  TYPE REF TO cl_document_bcs.
      DATA: sender                    TYPE REF TO cl_sapuser_bcs.
      DATA: recipient                 TYPE REF TO if_recipient_bcs.
      DATA: bcs_exception             TYPE REF TO cx_bcs.
      DATA: lt_contents               TYPE TABLE OF soli.
      DATA: lt_contents2              TYPE TABLE OF solix.
      DATA: lv_subject                TYPE sood-objdes VALUE 'Rental Units'.
      DATA: lv_length                 TYPE i.
      DATA: lv_receiver_email_address TYPE adr6-smtp_addr.
      DATA: lv_string                 TYPE string.
    Select the record for email address to send to off parameter table
      SELECT SINGLE value FROM zca_partr INTO gs_real_recipients-receiver
        WHERE progid = sy-repid
        AND   id     = 'OUT_EMAIL'.
      APPEND gs_real_recipients TO gt_real_recipients.
      CLEAR gs_real_recipients.
      CLEAR new_object_id.
      gv_items_sent = 'X'.
    Send back non-delivery and delivery reports.
      LOOP AT gt_real_recipients INTO gs_real_recipients.
        gs_real_recipients-notif_del  = 'X'.
        gs_real_recipients-notif_ndel = 'X'.
        gs_real_recipients-express    = gv_express.
        MODIFY gt_real_recipients FROM gs_real_recipients.
      ENDLOOP.
      gt_contents[] = gt_xml_out[].
    Set the subject of the email
      lv_subject                   = 'Rental Units for rent'.
      gs_packing_list-mail_subject = lv_subject.
      gs_packing_list-doc_type     = 'XML'.
      TRY.
    Create persistent send request
          send_request = cl_bcs=>create_persistent( ).
    Create and set document
    Create document from internal table with lt_content
          lt_contents[] = gt_contents[].
          DESCRIBE TABLE lt_contents[] LINES lv_length.
          gs_packing_list-doc_size = lv_length * 255.
          document = cl_document_bcs=>create_document(
                          i_type     = gs_packing_list-doc_type
                          i_text     = lt_contents
                          i_length   = gs_packing_list-doc_size
                          i_subject  = lv_subject
                          i_language = sy-langu
    Set the subject for the sending of mails.
          lv_string = gs_packing_list-mail_subject.
          TRY .
              CALL METHOD send_request->set_message_subject
                EXPORTING
                  ip_subject = lv_string.
            CATCH cx_sy_dyn_call_illegal_method .
          ENDTRY.
    Add document to send request
          CALL METHOD send_request->set_document( document ).
    Do send delivery info for successful mails
          CALL METHOD send_request->set_status_attributes
            EXPORTING
              i_requested_status = 'E'
              i_status_mail      = 'A'.
    Set sender
          sender = cl_sapuser_bcs=>create( sy-uname ).
          CALL METHOD send_request->set_sender
            EXPORTING
              i_sender = sender.
    Add recipients (e-mail addresses)
          LOOP AT gt_real_recipients INTO gs_real_recipients.
    Create recipient
            lv_receiver_email_address = gs_real_recipients-receiver.
            CHECK lv_receiver_email_address IS NOT INITIAL.
            recipient = cl_cam_address_bcs=>create_internet_address(
                                              lv_receiver_email_address ).
    Add recipient with its respective attributes to send request
            CALL METHOD send_request->add_recipient
              EXPORTING
                i_recipient  = recipient
                i_express    = 'X'
                i_blind_copy = gs_real_recipients-blind_copy.
          ENDLOOP.
    Send document
          CALL METHOD send_request->send(
            EXPORTING
              i_with_error_screen = 'X'
            RECEIVING
              result              = gv_sent_to_all ).
    Exception handling
        CATCH cx_bcs INTO bcs_exception.
          WRITE: text-001 , bcs_exception->error_type.
          EXIT.
      ENDTRY.
      COMMIT WORK.
    ENDFORM.                    " send_data_via_email
    I am not using the add_attachment method as the normal document create automatically creates the attachment.  Would using this method be critical?
    Kind Regards
    Gustav

  • Error while inserting XML data

    Hi,
    When I try to insert xml data, it gives the following error.
    --CREATE TABLE XMLTABLE OF XMLType;
    INSERT INTO XMLTABLE VALUES(XMLTYPE(getCLOBDocument('example.xml')));
    ORA-00600: internal error code, arguments: [qmxiUnpPacked2], [121], [], [], [], [], [], []
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    Any ideas?

    I've updated the FAQ with the answer to this one..
    XML DB FAQ

Maybe you are looking for