SAXParseException: cvc-elt.1 - XSD validation

Hello,
I'm trying to validate some generated XML against an XSD. The error I'm receiving is:
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'user'.
The generated XML starts like this:
<?xml version="1.0" encoding="UTF-8"?>
<user>
   <userName>...The start of the XSD looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="user">
...The Java code I'm using is this:
DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
documentBuilderFactory.setNamespaceAware(true);
DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
Document document = builder.parse(new ByteArrayInputStream(bytes));
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = schemaFactory.newSchema(url);
Validator validator = schema.newValidator();
validator.validate(new DOMSource(document));... where "bytes" is a byte array containing the XML that I have generated and "url" is a URL object containing the location of my XSD file.
I'm using Java version 1.6.0_12.
Have had a look elsewhere for reports of similar error messages but couldn't find anything definitive on what the problem is or any suggested solution.
Thanks for any assistance,
Von Entenduck

Not sure what your version of OIM is, but I have seen this in R2PS1 even though all the OOTB jobs and custom jobs are working fine. So I guess this can be safetly ignored.
-Bikash

Similar Messages

  • Org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of ..

    Hello,
    I try to validate a DOM Document using:
    SchemaFactory factory=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Source schemaFile=new StreamSource("myschema.xsd");
    schema schema=factory.newSchema(schemaFile);
    Validator validator=schema.newValidator();
    validator.validate(new DOMSource(document));
    I don't validate using the parse(File) method, because I already have a DOM Tree in memory.
    BUT now I receive the following error:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'catalogue'.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    at org.apache.xerces.jaxp.validation.DOMValidatorHelper.beginNode(Unknown Source)
    at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
    at org.apache.xerces.jaxp.validation.DOMValidatorHelper.validate(Unknown Source)
    at org.apache.xerces.jaxp.validation.XMLSchemaValidator.validate(Unknown Source)
    at javax.xml.validation.Validator.validate(Unknown Source)
    catalogue is my rootElement.
    I'm using jdk 1.4.
    Does somebody know how to solve this?
    Thank you!
    Katja

    extra information
    a part of the XSD schema:
    <?xml version="1.0" encoding="UTF-8"?><xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">     <xsd:element name="catalogue">    <xsd:complexType>      <xsd:sequence>        <xsd:element ref="date_created"/>        <xsd:element ref="date_modified"/>        <xsd:element ref="comment"/>        <xsd:element ref="books"/>        <xsd:element ref="cds"/>      </xsd:sequence>    </xsd:complexType>  </xsd:element>the code I'll using:
    public class DomWriterWithValidation extends AppBo{
         public static void main(String[] args) {
              DocumentBuilderFactory dbFactory=DocumentBuilderFactory.newInstance();
              dbFactory.setNamespaceAware(true);
              final String OUR_SCHEMA="C:/_develop/asja/lib/local/domxmlliblocal/properties/xmlfiles/catalogueBig.xsd";
              SchemaFactory schemaFactory=SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
              try{
                   Source schemaFile=new StreamSource(new FileInputStream(OUR_SCHEMA));
                   Schema schema=schemaFactory.newSchema(schemaFile);
                   Validator validator=schema.newValidator();
                   DocumentBuilder domBuilder=dbFactory.newDocumentBuilder();
                   File file=new File("C: /xmlfiles/catalogueDOMW1.xml");
                   Document document=domBuilder.newDocument();
                   Catalogue catalogue=getCatalogue(10,10);
                   writeXMLFile(file,catalogue,document,validator);
              }catch (Exception e) {
                   e.printStackTrace();
    public static void writeXMLFile(File file,Catalogue catalogue,Document document,Validator validator)throws SAXException{
              //1. BUILDING THE DOM TREE
              Element rootElement=document.createElement("catalogue");
              document.appendChild(rootElement);
              Element dateCreated=document.createElement("date_created");
              rootElement.appendChild(cds);
              OutputStream outputstream=null;               
                   try{
                        //2. WRITE THE DOM TREE TO AN XML FILE
                   TransformerFactory transformerFactory = TransformerFactory.newInstance();
                      Transformer transformer = transformerFactory.newTransformer();
                      transformer.setOutputProperty(OutputKeys.METHOD,"xml");
                      transformer.setOutputProperty(OutputKeys.INDENT,"yes");
                      outputstream=   new FileOutputStream(file.getPath());
                      /*With VALIDATION */
                        validator.validate(new DOMSource(document));
                   /*With VALIDATION */
                      transformer.transform(new DOMSource(document), new StreamResult(outputstream));      
              }catch (SAXException saxException){
                        System.out.println("The XML-file you are trying to create is not valid");
                        throw saxException;
              catch(Exception e){
                   e.printStackTrace();
              }finally{
                   try{
                   outputstream.close();
                   }catch (IOException ioException){
                        ioException.printStackTrace();
                        throw new RuntimeException(ioException);
    }A little part of the valid XML file I want to create:
    <?xml version="1.0" encoding="UTF-8"?><catalogue><date_created><day>1</day><month>7</month><year>2008</year></date_created><date_modified><day>1</day><month>7</month><year>2008</year></date_modified>

  • Validation error: cvc-elt.1: Cannot find the declaration of element

    I use JAXP to do XML Parsing and validation. I use DOM and not SAX.
    My code is as follows:
    SchemaFactory schemaFactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
    File schemaLocation = new File("C:\\config\\JMS_properties.xsd");
    Schema schema = schemaFactory.newSchema(schemaLocation);
    // Create the validator
    Validator validator = schema.newValidator();
    // Add an error handler to the validator
    JMSErrorHandler errorHandler = new JMSErrorHandler();
    validator.setErrorHandler(errorHandler);
    // Create the dom factory
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    // Set the namespace property
    domFactory.setNamespaceAware(true);
    // Create the document builder
    DocumentBuilder builder = domFactory.newDocumentBuilder();
    // Parse the xml file
    Document doc = builder.parse(xmlFile);
    // Create the dom source and destination
    // The destination will contain the doc augmented with the default attribute/element
    DOMSource source = new DOMSource(doc);
    DOMResult result = new DOMResult();
    // Validate and augment the source
    validator.validate(source, result);
    // Error checking
    if ( errorHandler.validationError == true ) {
        // errors occured during the parsing
        System.out.println("XML file is not valid");
        System.exit(1);
    // Get the augmented document
    this.augmented = (Document) result.getNode();When executing my code, I got:
    Validation error: cvc-elt.1: Cannot find the declaration of element 'JMSProperties'
    But the xml file has this element in it so I do not understand the meaning of that error.
    ??????

    I fight with the same error, it is curious that the schema from schemaLocation can not be validated. If i set the schema manually through an attribute it works. What i try to do is overwriting the resolveEntity in the handler to get the schema from another location and validate the xml against the schema specified in the attribute schemaLocation rather than setting it manually :-(

  • Xsd validation of an xml.. another program...

    hiii......this is another program ..........
    please see the problem with the code..
    package com.pgs.tma;
    import java.io.*;
    import javax.xml.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.*;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import java.io.IOException;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class valid {
         static final String JAXP_SCHEMA_SOURCE =
                        "http://java.sun.com/xml/jaxp/properties/schemaSource";
         public static void main(String args[]) throws IOException, SAXException, ParserConfigurationException
         if(args.length < 2)
                             System.err.println("usage is:");
                             System.err.println(" java -jar tips.jar -validatedom "
                                                      + "xml.xml xsd.xsd");
                             return;
         System.out.println(args[0]);
         System.out.println(args[1]);
         File input = new File(args[0]),
                             schema = new File(args[1]);
              DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
              factory.setValidating(true);
         System.out.println("1");
         try{
              System.out.println("2");
              factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
    "http://www.w3.org/2001/XMLSchema");
              System.out.println("3");
              factory.setAttribute(JAXP_SCHEMA_SOURCE,"C://TWWorkspace//TMA//input//schema.xsd");
    //     factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource",schema);
         System.out.println("4");
         catch(IllegalArgumentException x)
                   System.out.println("5");
                   System.err.println(" DOM parser is not JAXP 1.2 compliant"+x);
         System.out.println("6");
         Document doc = null;
         try{       
              DocumentBuilder parser = factory.newDocumentBuilder();
              //factory.setErrorHandler( myErrorHandler );
              doc = parser.parse(input);
              System.out.println("7");
         catch (ParserConfigurationException e){
              System.out.println("Parser not configured: " + e.getMessage());
         catch (SAXException e){
              System.out.print("Parsing XML failed due to a " + e.getClass().getName() + ":");
              System.out.println(e.getMessage());
         catch (IOException e){
              e.printStackTrace();
         System.out.println("end of program");
    the error message is:
    C:\TWWorkspace\TMA\input\input.xml
    C:\TWWorkspace\TMA\input\schema.xsd
    1
    2
    3
    5
    DOM parser is not JAXP 1.2 compliantjava.lang.IllegalArgumentException: http://java.sun.com/xml/jaxp/properties/schemaSource
    6
    Warning: validation was turned on but an org.xml.sax.ErrorHandler was not
    set, which is probably not what is desired. Parser will use a default
    ErrorHandler to print the first 10 errors. Please call
    the 'setErrorHandler' method to fix this.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=3: cvc-elt.1: Cannot find the declaration of element 'shiporder'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=4: cvc-elt.1: Cannot find the declaration of element 'orderperson'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=5: cvc-elt.1: Cannot find the declaration of element 'shipto'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=6: cvc-elt.1: Cannot find the declaration of element 'name'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=7: cvc-elt.1: Cannot find the declaration of element 'address'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=8: cvc-elt.1: Cannot find the declaration of element 'city'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=9: cvc-elt.1: Cannot find the declaration of element 'country'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=11: cvc-elt.1: Cannot find the declaration of element 'item'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=12: cvc-elt.1: Cannot find the declaration of element 'title'.
    Error: URI=file:C:/TWWorkspace/TMA/input/input.xml Line=13: cvc-elt.1: Cannot find the declaration of element 'note'.
    7
    end of program

    I see you problem but the strictness of XML is essential. One has learned from of HTML - each browser trying to fix and show the stuff in spite of, say, invalid tags. To blow up at the first error is a compliant (and maybe desired?) behaviour.

  • Error::cvc-elt.4.2 -- namespaces

    Hi all,
    I have this entry message for a web service (deployed in BPEL 10.1.3.1):
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >
    <SOAP-ENV:Header>
    <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:hdr="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <UsernameToken>
    <Username>XXXX</Username>
    <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</Password>
    </UsernameToken>
    </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <Dummy_Input xmlns="http://xmlnssns.oracle.com/DummyTypes" xmlns:s01="http://xmlnssns.oracle.com/DummyTypes">
    <InputData xsi:type="s01:InputData" xmlns:s="http://www.w3.org/2001/XMLSchema">
    <CodeEnt xsi:type="s:string">XXXX</CodeEnt>
    <NumUt xsi:type="s:decimal">397143067</NumUt>
    </InputData>
    </Dummy_Input>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    If I have the property VlidateXML=True, gives me the folowing error:
    Invalid xml document.
    According to the xml schemas, the xml document is invalid. The reason is: Error::cvc-elt.4.2: Cannot resolve 's:string' to a type definition for element 'CodeEnt'.
    Error::cvc-elt.4.2: Cannot resolve 's:decimal' to a type definition for element 'NumUt '.
    Please make sure that the xml document is valid against your schemas.
    If the property VlidateXML=False runs well.
    Can you help me to understand what is the error in the xml?
    Thank you in advance
    CD
    Dummy.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://xmlnssns.oracle.com/DummyTypes"
    targetNamespace="http://xmlnssns.oracle.com/DummyTypes"
    elementFormDefault="qualified">
    <xsd:element name="Dummy_Input" type="Dummy_Input"/>
    <xsd:complexType name="Dummy_Input">
    <xsd:sequence>
    <xsd:element name="InputData" type="InputData" minOccurs="1"
    maxOccurs="1"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="InputData">
    <xsd:sequence>
    <xsd:element name="CodeEnt" type="xsd:string" minOccurs="1"/>
    <xsd:element name="NumUt" type="xsd:decimal" minOccurs="0"
    nillable="false"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>

    Try following entry message:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    <SOAP-ENV:Header>
    <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
    xmlns:hdr="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <UsernameToken>
    <Username>XXXX</Username>
    <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">XXXX</Password>
    </UsernameToken>
    </Security>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
    <Dummy_Input xmlns="http://xmlnssns.oracle.com/DummyTypes" xmlns:s01="http://xmlnssns.oracle.com/DummyTypes">
    <InputData xsi:type="s01:InputData" xmlns:s="http://www.w3.org/2001/XMLSchema">
    <CodeEnt>XXXX</CodeEnt>
    <NumUt>397143067</NumUt>
    </InputData>
    </Dummy_Input>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Regards

  • Problem with xerces2 J (cvc-elt.1: Cannot find the declaration of element)

    cvc-elt.1: Cannot find the declaration of element 'Unternehmen'.
    Can anyone help me to get this problem solved?
    I am using xerces to validate a xml with a xsd scheme and i think there must be a error within the scheme. But the XSD Validator on w3c.org says that the xsd is fine !? :-o
    scheme (xsd)
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <xsd:complexType name="PersonTyp" abstract="true">
         <xsd:sequence>
           <xsd:element name="Vorname" type="xsd:string" maxOccurs="3"/>
           <xsd:element name="Name" type="xsd:string"/>
           <xsd:element name="Geburtsdatum" type="xsd:date"/>
         </xsd:sequence>
       </xsd:complexType>
       <xsd:complexType name="MitarbeiterTyp">
         <xsd:complexContent>
           <xsd:extension base="PersonTyp">
             <xsd:sequence>
               <xsd:element name="Gehalt">
                 <xsd:simpleType>
                   <xsd:restriction base="xsd:float">
                     <xsd:minInclusive value="10000"/>
                   </xsd:restriction>
                 </xsd:simpleType>
               </xsd:element>
             </xsd:sequence>
           </xsd:extension>
         </xsd:complexContent>
       </xsd:complexType>
       <xsd:element name="Unternehmen">
         <xsd:complexType>
           <xsd:sequence>
             <xsd:element name="Mitarbeiter" type="MitarbeiterTyp"
               maxOccurs="unbounded"/>
           </xsd:sequence>
         </xsd:complexType>
       </xsd:element>
    </xsd:schema>xml
    <?xml version="1.0" encoding="UTF-8"?>
    <Unternehmen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="Beispiel.xsd">
    <Mitarbeiter>
      <Vorname>Hagen</Vorname>
      <Vorname>Dieter</Vorname>
      <Name>Becker</Name>
      <Geburtsdatum>1967-08-13</Geburtsdatum>
      <Gehalt>39512.34</Gehalt>
    </Mitarbeiter>
    <Mitarbeiter>
      <Vorname>Jutta</Vorname>
      <Name>Stehl</Name>
      <Geburtsdatum>1976-09-11</Geburtsdatum>
      <Gehalt>42500.34</Gehalt>
    </Mitarbeiter>
    </Unternehmen>

    forget about this thread.
    i have read a chapter of http://java.sun.com/webservices/docs/1.2/tutorial/doc/index.html this document and found out that i missed a statement within my java code.
    Next, you need to configure the parser factory to generate a parser that is namespace-aware parser, as well as validating:
      SAXParserFactory factory = SAXParserFactory.newInstance();
      factory.setNamespaceAware(true);
      factory.setValidating(true); I MISSED THE factory.setNamespaceAware(true); LINE!!!!

  • Cvc-elt.1: Cannot find the declaration of element 'html'

    I was getting an error when I was trying to validate the following XML file as below:
    cvc-elt.1: Cannot find the declaration of element 'html'
    However the error below goes away when I type in
    <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
    instead of "<html xmlns="http://www.w3.org/1999/xhtml"
    I am not sure why the second way works. I am not familiar with namespaces, so if anyone could tell me why the second approach works, i would be grateful. Or, is there any other reason also that makes the error appear..Please demystify. Thanks very much
    The error:
    *cvc-elt.1: Cannot find the declaration of element 'html'*
    {code}
    <?xml version="1.0" encoding="UTF-8"?>
    *<html xmlns="http://www.w3.org/1999/xhtml"*      xmlns:xhtml="http://www.w3.org/2002/Xforms"
         xmlns:ev="http://www.w3.org/2001/xml-events"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema"
         xmlns:xsi="http://www/w3.org/2001/XMLSchema-instance"
         xmlns:xxforms="http://orbeon.org/oxf/xml/xform"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:fe="http://example.com/form/xform"
         xmlns:f="http://orbeon.org/oxf/xml/formatting"
         xmlns:xforms="http://w3.org/2002/xforms">
                   <head>
                        <title> ProtoType Complaint Form - 2 </title>
                        <!-- We are going to use an external CSS file here -->
                        <!-- <link rel="stylesheet" type="text/css" href="my_styles.css"/> -->
                        <!-- Let us use an Internal Style sheet as well -->
                        <!-- Let us use or adapt the Form Editor CSS in the form as suggested by Mike, Dan, Intalio -->
                        <!--We are going to be using CSS Rules:
                        A CSS rule comprises of a selector, and a property:value pair (declaration). -->
                        <!--
                        selector:
                             how content can be selected for styling, for example, the selector for a level-one
                        heading element is h1; selectors include element name, ID and class
                        property:
                             how a presentation attribute of an element can be targeted, for example, the font-family
                             property refers to the typeface content should be set in
                        value:
                             the values permitted for each property; for example, a colour can be set using a keyword:
                             red, green, blue; or a hexadecimal code: #f00, #0f0, #00f
                        -->
                        <!--
                        We are going to use Solitary ID selectors:
                             those that can apply to any type of element and have the simple syntax
                             #idname, for example, #title. This selector selects the single element on a page
                             that has an ID of "title".
                        -->
                        <!-- SideNote: Keyword - "CSS pseudo elements" -->          
                        <style type="text/css">
                        <!-- #xforms_cntrl_COMPLAINT_TYPE {position : absolute; top : 30; left : 270; width : 195; height : 29; margin : 0; padding : 0;} -->
                             h1
                                  font: bold 20pt helvetica,verdana;
                             h2
                                  font: bold 18pt helvetica,verdana;
                             h3
                                  font: bold 16pt helvetica,verdana;
                             /* blue background for Group labels */
                             /* h4 { font: bold 14pt helvetica,verdana; background-color: #1078E1; } */
                             h4
                                  font: bold 14pt helvetica,verdana;
                             .xforms-group {
                             /* border: 10px; */
                             border: thin solid #0000FF;
                             background-color: #ffffcc;
                             PADDING-RIGHT: 0.5em;
                             DISPLAY: block;
                             margin-bottom:5px;
                             /* display: table-row; */
              .xforms-label { font-weight: bold }
                        </style>
                        <!-- define the form model -->
                        <!-- We will constrain instance data by specifying an XML schema -->
                        <!-- xforms:model starts here -->
                        <xforms:model schema="test2.xform.xsd" id="COMPLAINT_DATA">
                             <!-- Task input -->
                             <xforms:instance id="taskinput">
                                  <fe:input>
                                       <fe:Arrestee_Last_Name/>
                                       <fe:Arrestee_First_Name/>
                                  </fe:input>
                             </xforms:instance>
                                  <xforms:instance id="taskmetadata">
                                  <!-- if I need to populate some instance using an XSL stylesheet and eXist ?? -->
                                       <taskmetadata/>
                                  </xforms:instance>
                             <!-- Task Output -->
                             <xforms:instance id="taskoutput">
                                  <fe:output>
                                       <fe:Arrestee_Last_Name/>
                             <fe:Arrestee_First_Name/>
                                  </fe:output>
                             </xforms:instance>     
                             <!-- the xforms-ready event is used here to trigger setValue -->
                             <!-- We set Instance Values with the xforms:setvalue Action -->
                             <xforms:action ev:event="xforms-ready">
                                  <xforms:action xforms:if="string(instance('taskoutput')/@saved) != 'true'">
                                       <xforms:setValue ref="instance('taskoutput')/fe:Arrestee_Last_Name" value="instance('taskinput')/fe:Arrestee_Last_Name" />
                                       <xforms:setValue ref="instance('taskoutput')/fe:Arrestee_First_Name" value="instance('taskinput')/fe:Arrestee_First_Name" />
                                  </xforms:action>
                             </xforms:action>
                             <!-- can I use type="xsd:string ?? -->
                             <xforms:bind nodeset="instance('taskoutput')/fe::Arrestee_Last_Name" relevant="true()" type="xs:anyURI" />
                             <xforms:bind nodeset="instance('taskoutput')/fe:Arrestee_First_Name" relevant="true()" type="xs:anyURI" />     
                        </xforms:model> <!-- xforms:model ends here -->
                   </head>     
              <body>
                        <h3>
                             <center>
                                  <font color="blue">
                                       Criminal Complaint <br></br>
                                  </font>
                             </center>
                        </h3>          
                        <!-- Use Later??
                        <div id="intalio-bpms-form">
                             <div id="xforms_cntrl_output105">
                                  <xforms:output ref="instance('taskoutput')/fe:output105"/>
                             <div>
                        <div> -->
                        <xforms:group appearance="full">
                        <p class="proto">
                             <xforms:input model="COMPLAINT_DATA" ref="instance('taskinput')/fe:input/fe:Arrestee_Last_Name">
                                  <xforms:label>Arrestee Last Name: </xforms:label>
                             </xforms:input>     
                        </p>
                        <p class="proto">
                             <xforms:input model="COMPLAINT_DATA" ref="instance('taskinput')/fe:input/fe:Arrestee_First_Name">
                                  <xforms:label>Arrestee First Name: </xforms:label>
                             </xforms:input>     
                        </p>
                        </xforms:group>     
              </body>
         </html>

    Though this is not my area, you can have a look at this thread which may help you
    [Re: XML inputs in a MII transaction to be used as a Web Service call|XML inputs in a MII transaction to be used as a Web Service call;
    thanks
    G. Lakshmipathi

  • XSD VALIDATION IN ABAP PROGRAM

    Hi,
    I have a requirement where in a report i am picking xml file from the presentation server (desktop) and then i am parsing the xml file using FM "SMUM_XML_PARSE" (first i use FM SCMS_BINARY_TO_XSTRING and then SMUM_XML_PARSE). after using the function SMUM_XML_PARSE i get the xml data in my internal table and then my report uses that data for some processing. This all is working fine .
    My issue is that how do i do a XSD VALIDATION for the xml file that i am reading . I would have liked to do a xsd validation after i import the xml file and throw error if the xml file is not as per its xsd.As i am not using any middleware technology like XI/ WTX which have XSD validation functionality i am not sure how to achieve this in abap program.

    Hi,
    I think you're right, iXML can only validate DTD via its if_ixml_parser->set_validating method (you can find this information in SAP SDN article "ABAP XML Mapping", as of release 6.10, I couldn't find any other reference saying that xsi:noNamespaceSchemaLocation is supported since then).
    By looking at SDN, I saw an external link about XSD to DTD conversion via XSLT (http://crism.maden.org/consulting/pub/xsl/xsd2dtd.xsl), but I don't have any idea if it works. On another thread, people used OS command to do XML/XSD validation, but didn't describe what they ran exactly (anyway, that means using any external tool).
    Sandra

  • Problem in creating Data/Service in FlashBuilder 4 beta 2 with this error .cvc-elt.1: Cannot find the declaration of element 'model'

    hi
    i have a problem after installing flashBuilder 4 beta2 .
    when i want to create Data/Service with BlazeDs and when i click on button finish
    this error shown and I can't do anything with it .
    in flashBuilder beta1 it's work perfect .
    if any one in thereand know why?
    please help me
    ERROR: XML parse error : Error on line 1 of documen : cvc-elt.1:Cannot find declaration of element 'model'. Nested exeption:Cannot find declaration of element 'model'.
    thanks

    Hi,
    Thanks for your feedback
    Can you attach your sample project and provide details on the Flash Builder and BlazeDS builds you are using?
    Also add your vote to http://bugs.adobe.com/jira/browse/FB-23479 a similar known issue
    Thanks,
    Balaji
    http://balajisridhar.wordpress.com

  • FTP Adapter XSD Validation

    Hi All,
    Oracle InterConnect 10.1.2
    Oracle Adapters (AQ,FTP) using XSD
    FTP Adapter on local filesystem
    In the FTP Adapter, Is there anyway to validate the XML content against the XSD?
    The validation is happening at the common view when i use the "Validate XML" check box while creating the event in iStudio. However this option does not appear while configuring the FTP adapter in iStudio. I would like FTP adapter to reject the XML file if the XSD validation fails and move the file to the exception folder.
    Objective: XSD should perform datatype, datasize and format validations.
    Thanks,
    Sherry

    Can anyone let me know how to enforce the XSD validation in the adapter. As of now only the structure of the message is being checked.

  • Can SOA 11g fault policy handle XSD Validation errors from the Mediator?

    I would like all errors in my SOA process to go through the fault-policies.xml. But I don't seem to be able to catch any mediator error caused by an XSD validation failure. A sample of the sort of error I am trying to 'catch' is:
    Nonrecoverable System Fault          oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01303:[Payload default schema validation error]XSD schema validation fails with error Invalid text 'A' in element: 'TermCode'Possible Fix:Fix payload and resubmit.
    My fault-policies.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1"
         id="NewStudentRegistrationFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:GetNewStudentRegistrationFile">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:TYPE_ALL">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:mediatorException">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    <faultPolicy version="2.0.1"
         id="MediatorFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA rejected msg. fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    </faultPolicies>
    My fault-bindings.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="NewStudentRegistrationFaults"/>
    <component faultPolicy="MediatorFaults">
    <name>NewStudentRegistrationMediator</name>
    </component>
    <service faultPolicy="NewStudentRegistrationFaults">
    <name>GetNewStudentRegistrationFile</name>
    </service>
    </faultPolicyBindings>
    You'll notice that I've tried a number of ways (and various other combinations) to try to steer the error above into my Java fault handler but nothing has meet with success. The mplan is as follows:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!--Generated by Oracle SOA Modeler version 1.0 at [2/3/10 1:21 PM].-->
    <Mediator name="NewStudentRegistationMediator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/sca/1.0/mediator"
    wsdlTargetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Experiments/NewStudentRegistration/GetNewStudentRegistrationFile%2F">
    <operation name="Get" deliveryPolicy="AllOrNothing" priority="4"
    validateSchema="true">
    <switch>
    <case executionType="queued" name="RegToBanner.insert_2">
    <action>
    <transform>
    <part name="$out.NewstudentregistrationCollection"
    function="xslt(xsl/NewStudentRegistration_To_NewstudentregistrationCollection.xsl, $in.body)"/>
    </transform>
    <invoke reference="RegToBanner" operation="insert"/>
    </action>
    </case>
    </switch>
    </operation>
    </Mediator>
    I'm a newbie to Oracle SOA. So perhaps I am missing the obvious. But I haven't read much in the documentation specifically about using the XSD validation option on the mediator and have seen nothing specifically about catching this sort of exception in the fault policy (apart from the faults I already have in my policy). Can anyone suggest what I am doing incorrectly here or perhaps whether what I am attempting to do is not possible? Thanks.
    - Cris

    Has anyone got it working yet?
    In my case, I have the following sequence:
    FileAdapter -> Mediator1 -> Mediator2->DB Adapter
    I am deliberately introducing validation error in File. Isn't it correct to assume Fault framework would get triggered at Mediator1 level since we are invoking FileAdapter service?
    I am getting a strange behaviour. If I enable XSD validation at Mediator1 level, process is Faulted with no re-try option. However, if I enable XSD validation ONLY at Mediator2 level, I get Recoverable fault. There seems to be some disconnect between documentation and reality. I am using JDeveloper 11.1.1.3.0 version and SOA Suite 11g.
    Thanks,
    Amjad.

  • Attributes missing after XSD validation!

    I'm feeding a very simple XML file into an equally simple XSD validator. When it returns, all of my tags are fine, but the attributes are dropped. If I parse the file directly, without validation, the attributes are fine.
    I've posted my files online at http://www.pastie.org/507569
    Am I doing something wrong here? Is this a bug in my JRE (1.6.0r14)?
    Thanks for any help,
    Norman

    XML
    <config blah="5">hello!</config>
    XSD
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
         <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />
      <xs:element name="config">
       <xs:complexType>
        <xs:simpleContent>
         <xs:extension base="xs:string">
          <xs:attribute name="blah" type="xs:string"/>
         </xs:extension>
        </xs:simpleContent>
       </xs:complexType>
      </xs:element>
    </xs:schema>
    My code...
    SchemaFactory schema_factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = schema_factory.newSchema(new File("test.xsd"));
    StreamSource xml_source = new StreamSource(new File("test.xml"));
    StringWriter xml_bridge = new StringWriter();
    StreamResult xml_result = new StreamResult(xml_bridge);
    Validator validator = schema.newValidator();
    validator.validate(xml_source, xml_result);
    System.out.println("Validated to: " + xml_bridge.toString());
    Result...
    Validated to: <?xml version="1.0" encoding="UTF-8"?><config>hello!</config>

  • XSD validation for incoming data into BPEL process

    Please suggest how to validate XSD incoming data into BPEL process.
    I just wanted to verify the data before entering into BPEL

    Hi,
    I guess i am replying very late.
    In BPEL 2.0 we have an activity called "Validate" which can do the XSD validations.
    "Lets Learn Oracle SOA: Validate XML schema In BPEL"
    Regards,
    Chinmaya

  • XSD VALIDATION

    Hi,
    I have generated the DOM TREE and this dom tree need to pass through XSD Validate and then the generated (XML) is to go through the XSLT processor.
    I need your suggestion how to go with after generating the DOM TREE.
    Thanks.

    Nice find, Ben. Thanks.
    I've been using jUnit with the XML and XSD support in Java 5. Here's a link, if anyone is looking for a way to do XSD validation from within a Java program:
    http://itunesu-api-java.googlecode.com/svn/branches/xsd-validation/src/test/edu/ asu/itunesu/XsdTest.java
    Dave

  • XSD validation with multiple namespaces

    Hi All,
    I'm trying to validate some XML using an XSD that contains multiple namespace schema descriptions, as such, the main XSD file must import an XSD for each namespace.
    The difficulty is that I cannot seem to find a way (in Oracle) to run a XSD validation using this (multi-XSD file) method.
    Has anyone out there tackled a similar problem?
    Cheers,
    Ben

    check out the class
    CL_XML_SCHEMA
    Regards
    Raja

Maybe you are looking for

  • Mail address book and my Address Book.app are different

    I tried to delete Plaxo. Now when I access my address book from Mail, I don't have the 3rd column containing phone numbers, addresses, etc. However my AddressBook.app has all that information, but it doesn't work with Mail. I click on an address with

  • How do I rotate an upside down video?

    I have recorded a video on a 4S iPhone and it has uploaded upsidedown on my MacBook.  Is here a way to rotate the video, and save it this way?

  • The amount of credit showing is back !!!!

    We often complain about so-called improvements to Skype which seem in our eyes to be totally idiotic and without any thought or reason, but on this occasion in today's version update ( 7.2.0.103 ) the amount of credit is back again, showing on screen

  • Unable to find the recovery media disc

    Hi, I'm not sure if anyone could help me, I've been trying to search for the option to make an order for the recovery media disc for my Hp 2000-2b89WM and I've had no luck. My system recently crashed with a pop-up erorr message stating "Bad_pool_head

  • Goods Receipt Quantity Blank

    Classic Scenario; SRM 5.0; R/3 46C Hello everyone, I have a confusing issue - issue is that when I open up the Create Confirmations page and open the confirmations screen, the quantity (Ordered quantity) is missing and there is a blank editable text