Problem in SAX XSD schema validator

hi
I've tried this code to validate XML using xsd file:
public static void validate(String xmlFilePath, URL schemaFileUrl)
        try
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setValidating(false);// stop standard validation to allow
                                            // custom schema
            factory.setNamespaceAware(true);
            SchemaFactory schemaFactory = SchemaFactory
                    .newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
            factory.setSchema(schemaFactory.newSchema(schemaFileUrl));
            SAXParser parser = factory.newSAXParser();
            XMLReader reader = parser.getXMLReader();
            // Register the error handler
            reader.setErrorHandler(new JS_ValidationError());
            // Parse the file as the first argument on the command-line
            reader.parse(xmlFilePath);
        catch (SAXException e)
            System.out.println("Error: " + e.getMessage());
            e.printStackTrace();
        } catch (IOException e)
            System.out.println("Error: " + e.getMessage());
            e.printStackTrace();
        } catch (ParserConfigurationException e)
            // TODO Auto-generated catch block
            e.printStackTrace();
    } I have called this method ,but it issues this error :"unknown protocol" followed by windows partition name, in the debug I found that the value of the url is "*file://(*windows-partiton-char)/rest of path" !!!
this should work but it doesn't!!
so how can I fix this problem?
thanks

someone sent me this code to fix,it works:
package schemaValidationPackage;
* XsdSchemaSaxValidator.java
* Copyright (c) 2007 by Dr. Herong Yang. All rights reserved.
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.XMLConstants;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.sax.SAXSource;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import javax.xml.validation.Validator;
import java.io.*;
import java.net.URL;
//also thanks for developer Hind Abd-El-Khalek
public class XsdSchemaSaxValidator {
     public static void validate(String xmlFilePath, URL schemaFileUrl)
        try
            SAXParserFactory factory = SAXParserFactory.newInstance();
            factory.setValidating(false);// stop standard validation to allow
                                            // custom schema
            factory.setNamespaceAware(true);
            SchemaFactory schemaFactory = SchemaFactory
                    .newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
            factory.setSchema(schemaFactory.newSchema(schemaFileUrl));
            SAXParser parser = factory.newSAXParser();
            XMLReader reader = parser.getXMLReader();
            // Register the error handler
            reader.setErrorHandler(new JS_ValidationError());
            // Parse the file as the first argument on the command-line
            reader.parse(xmlFilePath);
        catch (SAXException e)
            System.out.println("Error: " + e.getMessage());
            e.printStackTrace();
        } catch (IOException e)
            System.out.println("Error: " + e.getMessage());
            e.printStackTrace();
        } catch (ParserConfigurationException e)
            // TODO Auto-generated catch block
            e.printStackTrace();
  public static void validateXml(Schema schema, String xmlName) {
    try {
      // creating a Validator instance
      Validator validator = schema.newValidator();
      // preparing the XML file as a SAX source
      SAXSource source = new SAXSource(
        new InputSource(new java.io.FileInputStream(xmlName)));
      // validating the SAX source against the schema
      validator.validate(source);
      System.out.println();
      System.out.println("Validation passed.");
    } catch (Exception e) {
      // catching all validation exceptions
      System.out.println();
      System.out.println(e.toString());
  public static Schema loadSchema(String name) {
    Schema schema = null;
    try {
      String language = XMLConstants.W3C_XML_SCHEMA_NS_URI;
      SchemaFactory factory = SchemaFactory.newInstance(language);
      schema = factory.newSchema(new File(name));
    } catch (Exception e) {
      System.out.println(e.toString());
    return schema;
}

Similar Messages

  • Problem when attribute fails schema validation

    I have got a problem during schema validation... let's say i have the following record:
    <employee ssn="123456789D" recordNum="10">
    <lastName>Bloggs</lastName>
    <firstName>Joe</firstName>
    <address>123 America Ave</address>
    </employee>
    apparently the attribute ssn will fail the schema, since ssn has to be all digit and length 9. Currently my schema vaildation process will keep on going to the next record if the current one fails, and write the current bad record to a error log file. the problem i have found is that if the ssn attribute validation fails, then there is no way for me to obtain the value of recordNum attribute (all elements can still be obtained).
    just wondering if anyone had similar problem...
    thanks

    My understanding of schmemas was that once an error is found the whole document is considered invalid. Kind of like if the XML file format is bad.
    If you don't mind me asking are you using DocumentBuilder to parse and is it giving you a SAXParseException?

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Xml schema validation problem

    Hi All
    How to tackle this xml schema validation problem
    i am using the sample code provided by ORacle technet for xml
    schema validation in the Oracle database(817).
    The sample code works perfectly fine.
    Sample as provided by http://otn.oracle.com/tech/xml/xdk_sample/archive/xdksample_093001.zip.
    It works fine for normal xml files validated against
    xml schema (xsd)
    but in this case my validation is failing . Can you let me know why
    I have this main schema
    Comany.xsd
    ===========
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.company.org"
    xmlns="http://www.company.org"
    elementFormDefault="qualified">
    <xsd:include schemaLocation="Person.xsd"/>
    <xsd:include schemaLocation="Product.xsd"/>
    <xsd:element name="Company">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Person" type="PersonType" maxOccurs="unbounded"/>
    <xsd:element name="Product" type="ProductType" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    ================
    which includes the following 2 schemas
    Product.xsd
    ============
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <xsd:complexType name="ProductType">
    <xsd:sequence>
    <xsd:element name="Type" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    ==============
    Person.xsd
    ===========
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <xsd:complexType name="PersonType">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="SSN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    =================
    now when i try to validate a xml file against Company.xsd
    it throws an error saying unable to find Person.xsd.
    no protocol error
    Now where do i place these 2 schemas(.xsd files) Person & product
    so that the java schemavalidation program running inside Oracle
    database can locate these files
    Rgrds
    Sushant

    Hi Jinyu
    This is the java code loaded in the database using loadjava called by a wrapper oracle stored procedure
    import oracle.xml.parser.schema.*;
    import oracle.xml.parser.v2.*;
    import java.net.*;
    import java.io.*;
    import org.w3c.dom.*;
    import java.util.*;
    import oracle.sql.CHAR;
    import java.sql.SQLException;
    public class SchemaUtil
    public static String validation(CHAR xml, CHAR xsd)
    throws Exception
    //Build Schema Object
    XSDBuilder builder = new XSDBuilder();
    byte [] docbytes = xsd.getBytes();
    ByteArrayInputStream in = new ByteArrayInputStream(docbytes);
    XMLSchema schemadoc = (XMLSchema)builder.build(in,null);
    //Parse the input XML document with Schema Validation
    docbytes = xml.getBytes();
    in = new ByteArrayInputStream(docbytes);
    DOMParser dp = new DOMParser();
    // Set Schema Object for Validation
    dp.setXMLSchema(schemadoc);
    dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    dp.setPreserveWhitespace (true);
    StringWriter sw = new StringWriter();
    dp.setErrorStream (new PrintWriter(sw));
    try
    dp.parse (in);
    sw.write("The input XML parsed without errors.\n");
    catch (XMLParseException pe)
    sw.write("Parser Exception: " + pe.getMessage());
    catch (Exception e)
    sw.write("NonParserException: " + e.getMessage());
    return sw.toString();
    This is the code i used initially for validating a xml file against single xml schema (.xsd) file
    In the above code could u tell how to specify the second schema validation code for the incoming xml.
    say i create another Schemadoc for the 2nd xml schema.
    something like this with another parameter(CHAR xsd1) passing to the method
    byte [] docbytes1 = xsd1.getBytes();
    ByteArrayInputStream in1 = new ByteArrayInputStream(docbytes1);
    XMLSchema schemadoc1 = (XMLSchema)builder.build(in1,null);
    DOMParser dp = new DOMParser();
    How to set for the 2nd xml schema validation in the above code or can i combine 2 xml schemas.
    How to go about it
    Rgrds
    Sushant

  • Schema validation problem in oracle 11g

    Hi,
    I am facing the following problem.
    The Issue.xsd contains two elements (element1, element2) described as below. It contains two types
    1. simpleType - MyStringType
    2. complexType - MyType, an extension of MyStringType
    Oracle XML DB can able to validate element2(simpleType), but not element1(complexType).
    ---------------------Issue.xsd File ------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="ConfigRoot" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="ConfigRoot" elementFormDefault="qualified">
         <xsd:element name="ConfigRoot" xdb:defaultTable="CONFIG_TBL_ISSUE">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="element1" type="MyType"/>
                        <xsd:element name="element2" type="MyStringType"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
         <xsd:simpleType name="MyStringType">
              <xsd:restriction base="xsd:string">
                   <xsd:pattern value="\d{2}([\W])\d{2}([\W])\d{2}"/>
              </xsd:restriction>
         </xsd:simpleType>
         <xsd:complexType name="MyType">
              <xsd:simpleContent>
                   <xsd:extension base="MyStringType">
                        <xsd:attribute name="id" type="xsd:integer"/>
                   </xsd:extension>
              </xsd:simpleContent>
         </xsd:complexType>
    </xsd:schema>
    --------------------- XML File -----------------
    <?xml version="1.0" encoding="UTF-8"?>
    <ConfigRoot xsi:schemaLocation="ConfigRoot Issue.xsd" xmlns="ConfigRoot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <element1 id="1">19-12-222</element1>
         <element2>19-12-555</element2>
    </ConfigRoot>
    Though the schema is registered as binary, oracle could not able to validate the element1. The XML gets properly validated in the XML editors.

    "Issue.xsd"
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="ConfigRoot" xmlns:xdb="http://xmlns.oracle.com/xdb" targetNamespace="ConfigRoot" elementFormDefault="qualified">
    <xsd:element name="ConfigRoot" xdb:defaultTable="CONFIG_TBL_ISSUE">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="element1" type="MyType"/>
    <xsd:element name="element2" type="MyStringType"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:simpleType name="MyStringType">
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="\d{2}(\W)\d{2}(\W)\d{2}"/>
    </xsd:restriction>
    </xsd:simpleType>
    <xsd:complexType name="MyType">
    <xsd:simpleContent>
    <xsd:extension base="MyStringType">
    <xsd:attribute name="id" type="xsd:integer"/>
    </xsd:extension>
    </xsd:simpleContent>
    </xsd:complexType>
    </xsd:schema>
    "Issue.xml"
    <?xml version="1.0" encoding="UTF-8"?>
    <ConfigRoot xsi:schemaLocation="ConfigRoot Issue.xsd" xmlns="ConfigRoot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <element1 id="1">19-12-222</element1>
    <element2>19-12-555</element2>
    </ConfigRoot>
    [oracle@srv01-18-102 20081010]$ sqlplus / as sysdba
    SQL*Plus: Release 11.1.0.7.0 - Production on Fri Oct 10 14:46:09 2008
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0      Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    SQL> create user otn identified by otn account unlock;
    User created.
    SQL> -- The Quick and Dirty way regarding granting privileges
    SQL> grant dba, xdbadmin  to otn;
    Grant succeeded.
    SQL> connect otn/otn
    Connected.
    SQL> create directory "XMLDIR_SCHEMA" as '/home/oracle/OTN/20081010';
    Directory created.
    SQL> -- Issue.xsd and Issue.xml are created and copied to the directory /home/oracle/OTN/20081010, on which I have read, write access as Linux user "oracle" (the oracle software owner)
    SQL> BEGIN
      2  DBMS_XMLSCHEMA.registerSchema(
      3  SCHEMAURL => 'Issue.xsd',
      4  SCHEMADOC => bfilename ('XMLDIR_SCHEMA', 'Issue.xsd'),
      5  GENTYPES => FALSE,
      6  OWNER => USER,
      7  OPTIONS => 3);
      8  end;
      9* /
    PL/SQL procedure successfully completed.
    SQL> select * from tab;
    TNAME                          TABTYPE  CLUSTERID
    CONFIG_TBL_ISSUE               TABLE
    SQL> set long 100000000
    SQL> desc "CONFIG_TBL_ISSUE"
    Name                                      Null?    Type
    TABLE of SYS.XMLTYPE(XMLSchema "Issue.xsd" Element "ConfigRoot") STORAGE BINARY
    SQL> set pages 5000
    SQL>  select dbms_metadata.get_ddl('TABLE','CONFIG_TBL_ISSUE',user) from dual;
    DBMS_METADATA.GET_DDL('TABLE','CONFIG_TBL_ISSUE',USER)
      CREATE TABLE "OTN"."CONFIG_TBL_ISSUE" OF "SYS"."XMLTYPE"
      XMLTYPE STORE AS BASICFILE BINARY XML  (
      TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10  
      NOCACHE LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS  1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    XMLSCHEMA "Issue.xsd" ELEMENT "ConfigRoot" ID 4768 DISALLOW NONSCHEMA PCTFREE 10
      PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "USERS"
    INSERT INTO "CONFIG_TBL_ISSUE"
    VALUES
    (XMLTYPE(bfilename('XMLDIR_SCHEMA','Issue.xml'),NLS_CHARSET_ID('AL32UTF8')));
    SQL> INSERT INTO "CONFIG_TBL_ISSUE"
      2  VALUES
      3  (XMLTYPE(bfilename('XMLDIR_SCHEMA','Issue.xml'),NLS_CHARSET_ID('AL32UTF8')))
      4  ;
    (XMLTYPE(bfilename('XMLDIR_SCHEMA','Issue.xml'),NLS_CHARSET_ID('AL32UTF8')))
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "19-12-555" is not valid with respect to the pattern
    SQL> -- TESTING EXCEPTIONS
    SQL> INSERT INTO "CONFIG_TBL_ISSUE"
      2  VALUES
      3  (XMLTYPE(
      4   '<?xml version="1.0" encoding="UTF-8"?>
      5   <ConfigRoot xsi:schemaLocation="ConfigRoot Issue.xsd" xmlns="ConfigRoot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      6   <element1 id="1">01-11-11</element1>
      7   <element2>02-11-11</element2>
      8   </ConfigRoot>
      9  '));
    1 row created.
    SQL> rollback;
    Rollback complete.
    SQL> -- ELEMENT 1 and 2 ARE WRONG (correct response)
    SQL> INSERT INTO "CONFIG_TBL_ISSUE"
      2  VALUES
      3  (XMLTYPE(
      4   '<?xml version="1.0" encoding="UTF-8"?>
      5   <ConfigRoot xsi:schemaLocation="ConfigRoot Issue.xsd" xmlns="ConfigRoot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      6   <element1 id="1">01-11-111</element1>
      7   <element2>02-11-111</element2>
      8   </ConfigRoot>
      9  '));
    (XMLTYPE(
    ERROR at line 3:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "02-11-111" is not valid with respect to the pattern
    SQL> -- ELEMENT 1 is WRONG (OOPS)
    SQL> INSERT INTO "CONFIG_TBL_ISSUE"
      2  VALUES
      3  (XMLTYPE(
      4   '<?xml version="1.0" encoding="UTF-8"?>
      5   <ConfigRoot xsi:schemaLocation="ConfigRoot Issue.xsd" xmlns="ConfigRoot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      6   <element1 id="1">01-11-111</element1>
      7   <element2>02-11-11</element2>
      8   </ConfigRoot>
      9  '));
    1 row created.
    SQL> rollback;
    Rollback complete.
    SQL> -- ELEMENT 2 is WRONG (correct response)
    SQL> SQL> INSERT INTO "CONFIG_TBL_ISSUE"
      2  VALUES
      3  (XMLTYPE(
      4   '<?xml version="1.0" encoding="UTF-8"?>
      5   <ConfigRoot xsi:schemaLocation="ConfigRoot Issue.xsd" xmlns="ConfigRoot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      6   <element1 id="1">01-11-11</element1>
      7   <element2>02-11-111</element2>
      8   </ConfigRoot>
      9  '));
    INSERT INTO "CONFIG_TBL_ISSUE"
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LSX-00333: literal "02-11-111" is not valid with respect to the patternIt looks like if, if I interpret the XML schema correctly, that it doesn't comply to the extension "myStringType" of the restriction base "MyType". I am not absolutely sure if this is correct behavior or not, because of the nesting. If it should comply to the extend and therefore also should comply to the restriction pattern then this would mean that you discovered a bug.
    If it is a bug or not, I think you should create a service request for this, asking Oracle Support for help.
    Grz
    Marco

  • How to implement the schema validation with XSD in adapter module

    Dear All,
    I am trying to develop a EJB as the file adapter mudule.
    Please guide me how to implement the schema validation of the source message with XSD.
    Or provide me the relative resources about this task.
    Thanks & Regards,
    Red
    Edited by: Grace Chien on Nov 19, 2008 8:23 AM

    Hi Grace,
    You can do the xml scema validation in PI7.1 version directly.
    To develop the adapter module for xml schema validation
    Validating messages in XI using XML Schema
    Schema Validation of Incoming Message
    Regards
    Goli Sridhar

  • Schema Validation on attributes of an element in XML againt XSD schema

    Hi,
    I had generated artifact java classes from XSD schema file.Now i am validatiing one sample XML document by using these classes in JAXB.The XML document is validated successfully.but only elements are validated ,but not attributes of that elements.for example ,i am giving wrong element which is not defined inside the schema file,it throws validation error as expected ,whereas validation against wrong attributes of elements in XML it is not working anyway,it does not throw any validation errors,but it should throw validation errors.kindly help me to solve this issue.
    Here The sample validation code snippets :
    import javax.xml.bind.ValidationEvent;
    import javax.xml.bind.ValidationEventHandler;
    import javax.xml.bind.ValidationEventLocator;
    public class MyEventHandler implements ValidationEventHandler{
         public boolean handleEvent(ValidationEvent ve) {
              if (ve.getSeverity()==ValidationEvent.FATAL_ERROR ||
                        ve .getSeverity()==ValidationEvent.ERROR){
                   ValidationEventLocator locator = ve.getLocator();
                   //Print message from valdation event
                   System.out.println("Invalid booking document: "
                             + locator.getURL());
                   System.out.println("Error: " + ve.getMessage());
                   //Output line and column number
                   System.out.println("Error at column " +
                             locator.getColumnNumber() +
                             ", line "
                             + locator.getLineNumber());
              return true;
    Unmarshaller unmarshaller = jc.createUnmarshaller();
    unmarshaller.setEventHandler(new MyEventHandler());

    Here is my analagous 'strange' behavior. I am jaxb processing and then marshalling generated classes to XML ( following the simple Sun 'PurchaseOrder' example )
    1. This works:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'>
    </xsd:complextType>
    </xsd:schema>
    2. This doesn't:
    <xsd:schema....>
    <xsd:complextType name = "myName">
    <xsd:attribute name='name1'/>
    <xsd:attribute name='name2'/>
    </xsd:complextType>
    </xsd:schema>
    That is, using more than one attribute line within this simple complex type causes nothing to be marshalled to XML.
    Ideas?

  • Schema Validation Key/Keyref and substitutionGroup Problem

    First, thank you for fixing the schemaLocation problem.
    My next question is about key/keyref and substitution. If I define a key/keyref relationship inside one element, then use another element to substitute that element, I found that the key/keyref relationship is not preserved in the new element using oracle schema validation. I am not clear whether this is the correct behavior.
    For example:
    <element name="extended" type="xl:extendedType" abstract="true">
    <key name="labelKey">
    <selector xpath=".//[@xlink:type='locator']"/>
    <field xpath="@xlink:label"/>
    </key>
    <keyref name="labelKeyRef1" refer="self:labelKey">
    <selector xpath=".//*[@xlink:type='arc']"/>
    <field xpath="@xlink:from"/>
    </keyref>
    </element>
    <element name="calculationlink" type="xl:extendedType" substitutionGroup="xl:extended"/>
    The key/keyref is not validated inside calculationlink in this case.
    Yufei
    null

    Yufei,
    After we tested the schema location problem using the test case we produced, we can't find it has any problem. Would you send us the test data you have if you think it not works for you?
    I will check your keyref soon.

  • Please add XSD Schema for validating TLF data in TLF 3.0

    It would be very beneficial to have a XSD schema for validating TLF data.  Please add this to TLF 3.0.  There are a couple of posts where others have already asked for this...
    http://forums.adobe.com/message/2795099#2795099
    http://forums.adobe.com/message/2223205
    Thanks!

    Sure Gang!
    We could use the XML schema to validate the TLF markup that we are generating from our publishing system.  We generate XML files which include the TLF markup and a XML schema would be very beneficial to validate that markup to make sure we are doing everything right.

  • XML validation against XSD Schema in ABAP

    Hi colleagues,
    I'm looking for a way to validate a XML against a XSD schema in ABAP, without using java or command line or something like that. Is there any way to do this only with ABAP?
    Thanks in advance.
    Regards,
    Guenter

    Hi everyone,
    I'm currently facing the same problem. I need to validate a xml file with an existing xsd schema for some export/import functionality. I just found an ABAP program doing this with a Java fallback. But isn't there a way doing this wihtout using Java but only ABAP? There certainly is, anyone an idea?
    Thank you and regards
    Maximilian

  • BPM Problem: Schema validation error notification

    Hello all,
    When a schema validation error takes place upon receiving XML messages via HTTP, is there something that can be set up in BPM to notify data owners? (either alert or email)
    Regards,
    Steve

    Bhavesh,
    <i>When you mean source schema validation, does it imply that you want to validate your Source XML before graphical mapping to make sure it meets the Source XML Schema?</i>
    validate my Source XML
    <i>As you pointed out you are usinga BPM, you can wrap the Transfromation step with a Exception handling block, so when there is a mismatch of Source schema and ite actual message the exception handler will be invoked and in the exception handler you can trigger alerts using the control step.</i>
    I'm using an outbound interface (outside BPM) to call the abstract interface (very first step in BPM), and there's a tranformation step after that. 
    -If the Source schema is wrong, will the error take place at the outbound interface or at the transformation step?  If outside at the outbound interface, i wouldn't be able to wrap anything around it.
    -Exception handling block means the BLOCK step?
    Regards,
    Steve

  • JAXP API provides no way to enable XML Schema validation mode

    I am evaluating XDK 9.2.0.5.0 for Java and have encountered another
    problem with XML Schema support when using the JAXP API.
    Using the classes in oracle.xml.jaxp.*, it appears to be impossible to
    enable XML Schema validation mode. I can set the schema object, but
    the parser does not use it for validation.
    If I use DOMParser directly, I can call the setValidationMode(int)
    method to turn on schema validation mode. There is no equivalient
    means to enable XML Schema validation when using the JAXP API.
    Test case for JAXP API:
    === begin OracleJAXPSchemaTest.java ======
    package dfranklin;
    import java.io.*;
    import javax.xml.parsers.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import oracle.xml.parser.schema.XMLSchema;
    import oracle.xml.parser.schema.XSDBuilder;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    public class OracleJAXPSchemaTest
    private final static String xsd = ""
    +"<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:dfranklin:test\">"
    +" <xsd:element name=\"amount\" type=\"xsd:integer\"/>"
    +"</xsd:schema>";
    private final static String xml =
    "<amount xmlns=\"urn:dfranklin:test\">1</amount>";
    public static void main(String[] args)
    throws Exception
    System.setProperty("javax.xml.parsers.DocumentBuilderFactory",
              "oracle.xml.jaxp.JXDocumentBuilderFactory");
    new OracleJAXPSchemaTest().run();
    public void run()
    throws Exception
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setValidating(true);
    dbf.setNamespaceAware(true);
    XMLSchema xmlSchema = buildXMLSchema(new StringReader(xsd));
    dbf.setAttribute("oracle.xml.parser.XMLParser.SchemaObject",
              xmlSchema);
    DocumentBuilder docbldr = dbf.newDocumentBuilder();
    Document doc = docbldr.parse(new InputSource(new StringReader(xml)));
    print(doc);
    private XMLSchema buildXMLSchema(Reader xsdin)
    throws Exception
    XSDBuilder xsdBuilder = new XSDBuilder();
    XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
    return xmlSchema;
    private void print(Document doc)
    throws
    javax.xml.transform.TransformerConfigurationException,
    javax.xml.transform.TransformerException
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(new DOMSource(doc), new StreamResult(System.out));
    System.out.println();
    === end OracleJAXPSchemaTest.java ======
    Running that program:
    java dfranklin.OracleJAXPSchemaTest
    produces this output
    Exception in thread "main" oracle.xml.parser.v2.XMLParseException: Element 'amount' used but not declared.
    at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:148)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:269)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
    at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:96)
    at dfranklin.OracleJAXPSchemaTest.run(OracleJAXPSchemaTest.java:40)
    at dfranklin.OracleJAXPSchemaTest.main(OracleJAXPSchemaTest.java:27)
    This shows that the parser is not using the XML Schema to validate the
    document. I think it's expecting to find a DTD.
    Here is the equivalent program using DOMParser directly, and setting
    validation mode to SCHEMA_VALIDATION.
    === begin OracleParserTest.java ====
    package dfranklin;
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.dom.*;
    import javax.xml.transform.stream.*;
    import oracle.xml.parser.schema.XMLSchema;
    import oracle.xml.parser.schema.XSDBuilder;
    import oracle.xml.parser.v2.DOMParser;
    import oracle.xml.parser.v2.XMLParser;
    import org.w3c.dom.*;
    import org.xml.sax.*;
    public class OracleParserTest
    private final static String xsd = ""
    +"<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" targetNamespace=\"urn:dfranklin:test\">"
    +" <xsd:element name=\"amount\" type=\"xsd:integer\"/>"
    +"</xsd:schema>";
    private final static String xml =
    "<amount xmlns=\"urn:dfranklin:test\">1</amount>";
    public static void main(String[] args)
    throws Exception
    new OracleParserTest().run();
    public void run()
    throws Exception
    DOMParser dp = new DOMParser();
    XMLSchema xmlSchema = buildXMLSchema(new StringReader(xsd));
    dp.setXMLSchema(xmlSchema);
    dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    dp.parse(new InputSource(new StringReader(xml)));
    Document doc = dp.getDocument();
    print(doc);
    private XMLSchema buildXMLSchema(Reader xsdin)
    throws Exception
    XSDBuilder xsdBuilder = new XSDBuilder();
    XMLSchema xmlSchema = (XMLSchema)xsdBuilder.build(xsdin, null);
    return xmlSchema;
    private void print(Document doc)
    throws
    javax.xml.transform.TransformerConfigurationException,
    javax.xml.transform.TransformerException
    Transformer xformer = TransformerFactory.newInstance().newTransformer();
    xformer.transform(new DOMSource(doc), new StreamResult(System.out));
    System.out.println();
    === end OracleParserTest.java ====
    Running that program
    java dfranklin.OracleParserTest
    produces this output
    <?xml version = '1.0'?>
    <amount xmlns="urn:dfranklin:test">1</amount>
    In this case, the parser has validated the document.
    I also tried this with version 10.1.0.0.0 beta, and got the same
    error.
    Darin Franklin

    Thanks for posting that. I tried that code and still got my problem. The big difference is that I'm reading a group of XML files each of which uses a large number of schema files. There are over 50 schema files organized so they can be included as needed. Each of the XML files has a noNamespaceSchemaLocation attribute specifying one of the ten top schma files, that includes many others.
    However, I did solve the problem. I added one line --
           saxb.setFeature( "http://apache.org/xml/features/validation/schema",
                    true);
            // next line is new
            saxb.setProperty( JAXPConstants.JAXP_SCHEMA_LANGUAGE,
                    JAXPConstants.W3C_XML_SCHEMA );after the setFeature to turn on schema validation.
    (It needs an import org.apache.xerces.jaxp.JAXPConstants; statement.)
    Note:With the feature set to true and the setProperty commented out, the EntityResolver is called at construction tiem, and for each schema file, but each element is flagged as needing to be declared.
    With the feature commented out, and the setProperty in place, the EntityResolver is not called, and there is no validation performed. (I added invalid content to one of the files and there were no errors listed.)
    With both the setFeature and the setProperty in place, however, I get the calls from the EntityResolver indicating that it is processing the schema files, and for the good files, I get no errror, but for the bad file, I get an error indicating a bad validation.
    Now I can make the EntityResolver quiet and get what I wanted. Maybe there are other ways to do this, but I've got one that works. :-)
    Thanks to all who have helped.
    Dave Patterson

  • Schema validation error

    Hi!
    A am parsing XML using JAXP 1.3. If i parse my XML with schema validation, i got an exception: org.xml.sax.SAXParseException: http://www.w3.org/TR/xml-schema-1#cvc-type.3.1.1?g_start&xsi:nil at line: 48 column: 27.
    XML line: 48:
    <g_start xsi:nil="true"></g_start>Schema for this element:
    <xsd:element name="g_start" type="xsd:date" minOccurs="0" nillable="true"/>If i validate my XML with XMLSpy, it's OK.
    Is it problem in my XML, or something wrong with JAXP?

    i wonder what happens if you use
    <g_start xsi:nil="true"/>Nothing changes.
    I make some small sample, if your wold like to test it.
    <?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="root">
      <xsd:complexType>
       <xsd:choice maxOccurs="unbounded">
        <xsd:element name="elem" type="xsd:boolean" minOccurs="0" nillable="true"/>
       </xsd:choice>
      </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    <?xml version = "1.0" encoding="UTF-8" standalone="yes"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <elem xsi:nil="true"></elem>
    </root>
    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = schemaFactory.newSchema(new File("schema.xsd"));
    DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance();
    documentFactory.setSchema(schema);
    DocumentBuilder documentBuilder = documentFactory.newDocumentBuilder();
    Document document = documentBuilder.parse(new File("data.xml"));

  • Schemas validation

    I'm using schema validation to validate XML instances.
    In case of error (constraint violation), I need to provide information back to the user about the problem such as :
    - value provided by the user,
    - constraint violated,
    - list of the facets of the object (min, max, nb of fractional digits, ...) and in addition, if possible, some (non native) attributes of the element.
    Example :
    Here is a complex type (part of o schema) describing the properties an element must match :
    <xsd:complexType name="hciRADIUS_ACC_THRES_T">
         <xsd:simpleContent>
              <xsd:restriction base="FloatDef_T">
                   <xsd:maxInclusive value="99.9"/>
                   <xsd:minInclusive value="1.0"/>
                   <xsd:fractionDigits value="1"/>
                   <xsd:attribute ref="label" fixed="Radius Acc Thres"/>
                   <xsd:attribute ref="continous" fixed="true"/>
                   <xsd:attribute name="precision" type="xsd:decimal" fixed="0.1"/>
              </xsd:restriction>
         </xsd:simpleContent>
    </xsd:complexType>
    Here is the corresponding element :
    <xsd:element name="hciRADIUS_ACC_THRES" type="hciRADIUS_ACC_THRES_T">
    When receiving the element "hciRADIUS_ACC_THRES" in an XML instance with value 120.33 for example :
    <hciRADIUS_ACC_THRES>120.33</hciRADIUS_ACC_THRES>
    I would like to retrieve information about the properties of the element type in order to send an error message back to the user, message which could be formatted as follow :
    Radius Acc Thres error[info contained in attribute "label"] : value 120.33
    Possible values : from 1.0[info contained in "minInclusive" facet] to 99.9[info contained in "maxInclusive" facet], number of fractional digits is 1[info contained in "fractionDigits" facet]...
    My questions are :
    - Is it possible to do that using a java SAX or DOM parser ? -> can anybody send me some code examples or tell me where to find them ?
    - Should I use DOM Level 3 API ?
    Thank you all

    Yes, I can use an ErrorHandler, but the ErrorHandler has a very poor content (only a standard message). I need much more information on the error such as the facets of the error node to give a complete message back to the user (min value, max value, nb of frcational digits, ...)
    Thank you.

  • Custom xsd document validation referencing child xsd via import/include

    Hi,
    I need to build an ebXML 2.0 agreement which will use multiple xsd's. I have a root xsd document(Company.xsd) which imports two child xsd document(Product.xsd and Person.xsd).
    I've validated the xsd's and it seems to work. I even built a composite process and it works.
    The problem is when I use it in B2B Gateway 11g. I get an error saying it cannot validate against the xsd.
    I followed a thread Re: ebMS with custom xsd document which import other xsd's that tells me that
    I should ZIP it(all top level) and use the zipfile as the document definition and specify the root xsd(Company.xsd). Zipping it with just basic one level
    xsd seems to work but not multi level.
    Are multiple level xsd supported in B2B 11g?
    Regards,
    Robert
    P.S.
    I've attached the xsd and sample xml data.
    --- Company.xsd----
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.company.org" xmlns:per="http://www.person.org" xmlns:pro="http://www.product.org" targetNamespace="http://www.company.org" elementFormDefault="unqualified">
         <xsd:import namespace="http://www.person.org" schemaLocation="Person.xsd"/>
         <xsd:import namespace="http://www.product.org" schemaLocation="Product.xsd"/>
         <xsd:element name="Company">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="Person" type="per:PersonType" maxOccurs="unbounded"/>
                        <xsd:element name="Product" type="pro:ProductType" maxOccurs="unbounded"/>
                   </xsd:sequence>
              </xsd:complexType>
         </xsd:element>
    </xsd:schema>
    --- Person.xsd----
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.person.org"
    xmlns="http://www.person.org"
    elementFormDefault="unqualified">
    <xsd:complexType name="PersonType">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="SSN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    ---- Product.xsd----
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.product.org"
    xmlns="http://www.product.org"
    elementFormDefault="unqualified">
    <xsd:complexType name="ProductType">
    <xsd:sequence>
    <xsd:element name="Type" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    ----Sample XML Data----
    <?xml version="1.0" encoding="UTF-8"?>
    <n1:Company xsi:schemaLocation="http://www.company.org Company.xsd" xmlns:n1="http://www.company.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Person>
              <Name>MyName</Name>
              <SSN>12345</SSN>
         </Person>
         <Product>
              <Type>TheProduct</Type>
         </Product>
    </n1:Company>
    Edited by: RSamaniego on 30/08/2010 14:14

    This is the error I'm getting. I got this from the soa-server1-diagnostic file.
    [2010-08-31T08:46:54.209+12:00] [soa_server1] [ERROR] [] [oracle.soa.b2b.engine] [tid: weblogic.work.j2ee.J2EEWorkManager$WorkWithListener@1e84d54] [userId: <anonymous>] [ecid: 0000If4kAAfECSIMyqqYMG1CV1Rh000033,0] [APP: soa-infra] [dcid: e89d49f26b5a6f2c:11cf61b2:12ac4ba60b9:-7ffd-000000000000002b] oracle.xml.parser.v2.XMLParseException: Element 'Name' not expected.[[
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:319)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processDocument(CustomDocumentPlugin.java:896)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processOutgoingDocument(CustomDocumentPlugin.java:438)
         at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1326)
         at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:837)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1411)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:781)
         at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3319)
         at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:2948)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:575)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    oracle.xml.parser.v2.XMLParseException: Element 'Name' not expected.
         at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:342)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:319)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processDocument(CustomDocumentPlugin.java:896)
         at oracle.tip.b2b.document.custom.CustomDocumentPlugin.processOutgoingDocument(CustomDocumentPlugin.java:438)
         at oracle.tip.b2b.msgproc.Request.outgoingRequestPostColab(Request.java:1326)
         at oracle.tip.b2b.msgproc.Request.outgoingRequest(Request.java:837)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessageImpl(Engine.java:1411)
         at oracle.tip.b2b.engine.Engine.processOutgoingMessage(Engine.java:781)
         at oracle.tip.b2b.engine.Engine.handleMessageEvent(Engine.java:3319)
         at oracle.tip.b2b.engine.Engine.processEvents(Engine.java:2948)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.processEvent(ThreadWorkExecutor.java:575)
         at oracle.tip.b2b.engine.ThreadWorkExecutor.run(ThreadWorkExecutor.java:214)
         at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:105)
         at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:183)
         at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
    Edited by: RSamaniego on 30/08/2010 13:57

Maybe you are looking for