Validation againt schema using xsd restrictions

Hi, wonder if someone could give me some advice...
I've got an attribute which is of the following type:
<xsd:simpleType name="applicationType">
          <xsd:restriction base="xsd:NMTOKEN">
               <xsd:enumeration value="UKAPP1"/>
               <xsd:enumeration value="UKAPP2"/>
               <xsd:enumeration value="UKAPP3"/>
               <xsd:enumeration value="UKAPP4"/>
          </xsd:restriction>
if I validate this using the validate task in OSB message flow, it passes whatever value I put in the attribute.
If I validate my xml document using XMLSpy, it fails as I haven't entered a valid value. Missing elements etc from my xml will validate perfectly, but not these.
Am I missing something?
Pete

Hi Pete,
Good to hear from you.
I've tried this on the latest version of OSB and it seems to work with the following simple schema:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/NewXMLSchema"
     xmlns:tns="http://www.example.org/NewXMLSchema" elementFormDefault="qualified">
<element name="NewElement">
     <complexType>
          <sequence>
               <element name="payload" type="string"></element>
          </sequence>
          <attribute name="attr" type="tns:attrType"></attribute>
     </complexType>
</element>
<simpleType name="attrType">
     <restriction base="NMTOKEN">
          <enumeration value="UKAPP1"/>
               <enumeration value="UKAPP2"/>
               <enumeration value="UKAPP3"/>
               <enumeration value="UKAPP4"/>
          </restriction>
</simpleType>
</schema>
and a validate action configured as follows:
XPath: ./new:NewElement/@attr
In Variable: body
Against Resource: MCP/SimpleSchema (Type = attrType)
Raise Error radio button checked.
If I send in a message of the form:
<new:NewElement attr="UKAPP3" xmlns:new="http://www.example.org/NewXMLSchema">
<new:payload>string</new:payload>
</new:NewElement>
it validates OK, whereas if I send in a message of the form:
<new:NewElement attr="UKAPP5" xmlns:new="http://www.example.org/NewXMLSchema">
<new:payload>string</new:payload>
</new:NewElement>
validation fails.
If you are still seeing issues with this, can you send me the OSB config to take a look at.

Similar Messages

  • XML validation against schema in XSD format

    I have a requirement for validation of XML file against XML schema(XSD format). Using IXML liabrary I know how to validate XML file against schema in DTD format. But i am not getting how to do it against XSD. Is it possible using IXML liabrary? Also i wanted to know how to attach one XML or CSV file into another XML file using SAP ABAP.
    Please provide solution!!

    Hi Madhura,
    see here my comparison of the web version against the local file version on my Windows box (which is itself not the fastest): It makes a factor 16 in difference!
    C:\Temp\xsdvalidator>java XsdValidator madhu.xsd madhu.xml
    cvc-pattern-valid: Value 'provamail.it' is not facet-valid with respect to patte
    rn '[^@]+@[^.]+[.].+' for type 'EmailType'.
    NOK - Validation error
    Elapsed time: 16353 ms
    C:\Temp\xsdvalidator>java XsdValidator madhu_local.xsd madhu.xml
    cvc-pattern-valid: Value 'provamail.it' is not facet-valid with respect to patte
    rn '[^@]+@[^.]+[.].+' for type 'EmailType'.
    NOK - Validation error
    Elapsed time: 994 ms
    Obviously, the w3c.org domain that you specified as ressource location is very slow - and, as the FAQ shows, this delay is intentional!
    The W3C servers are slow to return DTDs. Is the delay intentional?
    Yes. Due to various software systems downloading DTDs from our site millions of times a day (despite the caching directives of our servers), we have started to serve DTDs and schema (DTD, XSD, ENT, MOD, etc.) from our site with an artificial delay. Our goals in doing so are to bring more attention to our ongoing issues with excessive DTD traffic, and to protect the stability and response time of the rest of our site. We recommend HTTP caching or catalog files to improve performance.
    --> They don't want to have requests to their site from productive servers all around the world.
    Regards,
    Rüdiger

  • Validating XML against an XML Schema using PL/SQL

    Hello everyone,
    I've a strange problem.
    I'm trying to validate an XMLTYPE variable against an XSD schema using the XMLisValid function.
    The XML I was trying to validate was returning false (0) when using this method.
    However, when I register the XSD against a column in a table and then insert this XMLTYPE into that column, I do not get any errors. If I change the XSD to ensure failure when using this method, I do get an error, so it is registered and working.
    I have then created a very basic XSD and both methods work when validating the XML against this. So obviously the more complicated XSD I want to validate against is making a difference, but I would expect them to either both fail or both pass, not one fail and one pass.
    Does anyone know why they'd be returning different results?
    Thanks in advance for your help.
    Robin
    examples of what I'm using:
    XML to validate:
    <centres>
    <add>
    <centre>
    <centreName>Name 1</centreName>
    <centreRef>45678</centreRef>
    </centre>
    </add>
    </centres>
    Simple XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="centres" type="centresType"/>
    <xs:complexType name="addType">
    <xs:sequence>
    <xs:element type="xs:string" name="centreName"/>
    <xs:element type="xs:short" name="centreRef"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="centresType">
    <xs:sequence>
    <xs:element type="addType" name="add" maxOccurs="3" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    Complicated XSD:
    <?xml version="1.0" encoding="utf-8" ?>
    <!--Created with Liquid XML Studio - 30 Day Trial Edition 7.1.6.1440 (http://www.liquid-technologies.com)-->
    <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="centres">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="remove">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1000" name="centreRef">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="50" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="add">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1000" name="centre">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="centreName">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="100" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="centreRef">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="50" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element minOccurs="0" maxOccurs="1" name="qualifications">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1000" name="qualRef">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="100" />
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="modifyQualAssociations">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="remove">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1000" name="r">
    <xs:complexType>
    <xs:attribute name="centreRef" use="required">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="50" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="qualRef" use="required">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="100" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="add">
    <xs:complexType>
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1000" name="a">
    <xs:complexType>
    <xs:attribute name="centreRef" use="required">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="50" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="qualRef" use="required">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:minLength value="1" />
    <xs:maxLength value="100" />
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Steps to validate XML data against a schema in Oracle:
    1. Register your XSD in the database.
    begin
    dbms_xmlschema.registerschema(
    SchemaUrl,
    SchemaDoc,
    local => TRUE/FALSE);
    end;
    2. For validating your XML document against your registered schema, here is a sample pl/sql block.
    declare
    v_xml xmltype;
    begin
    v_xml := your_xml_document;
    v_xml.schemaValidate();
    end;
    Hope this helps :)

  • Urgent!! - Validating Any Element using schema

    Hi,
    I am relatively new to XML. I need to return the out in XML. Here is the sample schema
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                   targetNamespace="http://www.its.ws/Inventory"
         xmlns="http://www.its.ws/Inventory">
         <xsd:element name="RESULT">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="DESCRIPTION"/>
                        <xsd:any minOccurs="0"/>
                   </xsd:sequence>
                   <xsd:attribute name="Status" use="required" type="xsd:integer"/>
                   <xsd:attribute name="ErrorCode" use="required" type="xsd:integer"/>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="DESCRIPTION" type="xsd:string"/>
         <xsd:element name="DELIVERY">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="po_del_date"/>
                        <xsd:element ref="po_del_qty"/>
                   </xsd:sequence>
         </xsd:complexType>
         </xsd:element>
         <xsd:element name="po_del_date" type="xsd:string" />
         <xsd:element name="po_del_qty" type="xsd:string"/>
    </xsd:schema>
    And here is my XML
    <?xml version="1.0"?>
    <Result xmlns="http://www.its.ws/Inventry"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.its.ws/Inventry Inventry.xsd"
              Status="1" ErrorCode="12">
              <Description>Vendor Code is NULL</Description>
              <Delivery>
                        <PurchaseOrderDelDate>2002-09-24</PurchaseOrderDelDate>
                        <PurchaseOrderDelQty>100.00</PurchaseOrderDelQty>
              </Delivery>
    </Result>
    In my XML file,
    I may or may not have Delivery element.
    If allows to have delivery element, doesn't validated it.
    When i validated in XMLWriter, it validates the Delivery element.
    Is this a bug in Oracle XML Engine or i am missing anything.
    Thanks in advance for ur advice

    Sorry, thats not the correct xml file.
    <?xml version="1.0"?>
    <RESULT xsi:schemaLocation="http://www.its.ws/Inventory ResultAny.xsd"
              xmlns="http://www.its.ws/Inventory"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              STATUS="0"
              ERRORCODE="0">
         <DESCRIPTION>There is no description defined</DESCRIPTION>
         <DELIVERY>
                        <!--<po_del_date>asdf</po_del_date>
                        <po_del_qty>asdf</po_del_qty>
                        -->
         </DELIVERY>
    </RESULT>
    Above is sample XML file. I am not concentrating on namespace, schema file and location ect,
    I have commented po_del_date & po_del_qty. There present is mandatory. It just checks whether xml file is proper or not, it does not validate, DELIVERY elements childs.
    When i validate it in XMLWriter, which users MSXML 4.x, it validates.

  • Validating xml doc using schema

    I was wondering if you can the following validation of an xml document using schema:
    <parent>
        <child>Jogn</child>
        <child>Hanna</child>
        <child>Blake</child>
        <childCount>3</childCount>
    <parent>the childcountValue equals the number of child node. is this possible using
    schema or do do i have to use an application to do this?
    thanx in advance

    thanx dvohra, but i already know how to validate schema using a parser.
    I'm looking for a way in the schema that specified thhat the total number of child elemnt equals to the integer value of the childTotal element. I don't even know if this is possible. If possible, what (tag) would i use. i don't need answer..hint would be nice.
    my other solution is to write an application that use a SAX parser to parse the xml doc. Although this is relatively easy, i would like to keep the validation within on file (the schema)..rather than have it be in the schema and a ContentHandler.

  • How to register a schema use a .xsd file which has lots of includes schema

    Hello, All,
    Does someone have the experience to register a schema use a .xsd file which contains several tags like <xs:include schemaLocation="../dt/somedatatypes.xsd"/>?
    I tried both the OEM and command line dbms_xmlschema.registerSchema(), although the whole file structure already in the repository, seems like Oracle can't automatically search and find the includes and register it. should I register those includes first? the actual error I got is "ORA-31000: Resource '../dt/somedatatypes.xsd' is not an XDB schema document.ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0 ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26 ORA-06512: at line 2" .
    Any suggestion? thanks in advance...

    We do not (currently) support relative references in included XML Schemas.
    In order to use an include or import the target Schema must first be registered with XML DB under some known location. The schemaLocation argument needs to the 'Docuemnt Location Hint', or URL, that was passed to registerSchema when the included schema was registered.
    If you have cyclic dependancies between schemas you can use the force option of registerSchema to register the first Schema. This will then allow registration of the second schema to succeed. Once the second schema has been successfully registed the first schema must be explicitiy recompiled using dbms_xmlschema.compileSchema().

  • Where can I find an example of a vi which reads a xml file using the Labview schema (LVXMLSchema.xsd)?

    Where can I find an example of a vi which reads a xml file using the Labview schema (LVXMLSchema.xsd)?
    �Unflatten From XML� is of little use in parsing because it requires the data type. So it seems that the user has to parse each data value, and then �Unflatten From XML� can help a little.
    I would like to see NI provide a VI for parsing it�s own schema.

    LabVIEW's XML functions are another way of saving data from controls and indicators that is in a more standardized format. If you look at the Unflatten From XML shipping example, it shows taking the data that you would normally send to a Digital Wveform Graph and converting it to XML instead. This data is then unflattend from XML and wired to the graph. Since you know what you wrote to the file, this is an easy thing to do. If what you are looking for is a way to look at any data in any LabVIEW XML file, then you are right, there is not a VI for that. However, I do not believe that that was the intention of the XML functions in the first place.
    By wiriting data in XML, this allows other applications outside of LabVIEW to parse and recognize the dat
    a. In LabVIEW, you would already know the types and can place a generic item of that type. The issue of knowing the type is that you need to know the type of the wire that comes out of the Unflatten function so that the VI will compile correctly. You could always choose a variant value to unflatten and then do some parsing to take the variant a part. Maybe this will help you out.
    See this example for using the Microsoft parser for XML. (http://venus.ni.com/stage/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CB9FE111EE034080020E74861&p_node=DZ52050&p_submitted=N&p_rank=&p_answer=)
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • Error while Validating xml against a schema using jaxp

    Hi All,
    Following code validates xml against a schema using JAXP .It gives SAXNotRecognizedException error when you run the program.
    static final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
    static final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
    SAXParserFactory myFactory = SAXParserFactory.newInstance();
    myFactory.setNamespaceAware(true);
    myFactory.setValidating(true);
    javax.xml.parsers.SAXParser parser;
    String filename = "C:/Note.xml";
    File xmlFile = new File(filename);
    try
         DefaultHandler handler = new DefaultHandler();
         parser = myFactory.newSAXParser();
         parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
         parser.parse(xmlFile, handler);
    catch (ParserConfigurationException e)
         // TODO Auto-generated catch block
         e.printStackTrace();
    catch (SAXException e)
         // TODO Auto-generated catch block
         e.printStackTrace();
    catch (IOException e)
         // TODO Auto-generated catch block
         e.printStackTrace();
    Error Details :
    org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
         at org.apache.xerces.framework.XMLParser.setProperty(XMLParser.java:1682)
         at org.apache.xerces.parsers.SAXParser.setProperty(SAXParser.java:770)
         at org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:183)
    How do i fix the above mentioned problem ?
    Thanks in Advance.
    Ansh

    Validate with the JAXP DOMParser instead of the JAXP SAXParser.
    To validate with a SAXParser use the xerces SAXParser.
    thanks,
    Deepak

  • Validating xml file against a specific schema using jaxp sax parser

    Hi,
    I would like to validate a soap xml given below
    <?xml version="1.0" encoding="UTF-8"?>
    <Envelope>
         <Body>
              <name>pavan</name>
              <number>123</number>
         </Body>
    </Envelope>
    to validate against the schema of soap from url "http://www.w3.org/2003/05/soap-envelope". I dont want to have this namespace in the xml. How can I validate against the specified schema using jaxp sax parser?
    Please help.
    Thanks,
    T.Pavan kumar

    Any one, please help.

  • Problem in mapping with xsd:restriction and xsd:enumeration

    Hello All,
    Our BPEL process is invoked from a .net client and has a JCA adapter as target. We need to map the input schema to JCA schema and the output should look like the following:
    Listing 1:
    <callMethod name='F4211FSBeginDoc' app='XMLInterop'
    runOnError='no'>
    <params>
    <param name='mnCMJobNumber' id='1'></param>
    <param name='cCMDocAction'>A</param>
    <param name='cCMProcessEdits'>1</param>
    <param name='szCMComputerID' idref='2'></param>
    <param name='cCMUpdateWriteToWF'>2</param>
    <param name='szCMProgramID'>XMLInterop</param>
    <param name='szCMVersion'>ZJDE0001</param>
    <param name='szOrderType'>SO</param>
    <param name='szBusinessUnit'> M30</param>
    <param name='mnAddressNumber'>4242</param>
    <param name='jdOrderDate'>2000/03/29</param>
    <param name='szReference'>10261</param>
    <param name='cApplyFreightYN'>Y</param>
    <param name='szCurrencyCode'></param>
    <param name='cWKSourceOfData'></param>
    <param name='cWKProcMode'></param>
    <param name='mnWKSuppressProcess'>0</param>
    </params>
    We have our JCA schema as follows:
    Listing 2:
    <types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="urn:iwaysoftware:jde/services/JDEJAVA_CSALES/B4200310/F4211FSBeginDoc"
    xmlns:ns="urn:iwaysoftware:jde/services/JDEJAVA_CSALES/B4200310/F4211FSBeginDoc" elementFormDefault="qualified">
    <xsd:element name="jdeRequest">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="callMethod">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="params">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="param" minOccurs="0" maxOccurs="112">
    <xsd:complexType>
    <xsd:simpleContent>
    <xsd:extension base="xsd:string">
    <xsd:attribute name="name" use="required">
    <xsd:simpleType>
    <xsd:restriction base="xsd:NMTOKEN">
    <xsd:enumeration value="mnCMJobNumber"/>
    <xsd:enumeration value="cCMDocAction"/>
    <xsd:enumeration value="cCMProcessEdits"/>
    <xsd:enumeration value="szCMComputerID"/>
    <xsd:enumeration value="cCMErrorConditions"/>
    <xsd:enumeration value="cCMUpdateWriteToWF"/>
    <xsd:enumeration value="szCMProgramID"/>
    <xsd:enumeration value="szCMVersion"/>
    <xsd:enumeration value="szOrderCo"/>
    <xsd:enumeration value="mnOrderNo"/>
    <xsd:enumeration value="szOrderType"/>
    <xsd:enumeration value="szBusinessUnit"/>
    <xsd:enumeration value="szOriginalOrderCo"/>
    <xsd:enumeration value="szOriginalOrderNo"/>
    <xsd:enumeration value="szOriginalOrderType"/>
    <xsd:enumeration value="mnAddressNumber"/>
    <xsd:enumeration value="mnShipToNo"/>
    <xsd:enumeration value="jdRequestedDate"/>
    <xsd:enumeration value="jdOrderDate"/>
    <xsd:enumeration value="jdPromisedDate"/>
    <xsd:enumeration value="jdCancelDate"/>
    <xsd:enumeration value="szReference"/>
    <xsd:enumeration value="szDeliveryInstructions1"/>
    <xsd:enumeration value="szDeliveryInstructions2"/>
    <xsd:enumeration value="szPrintMesg"/>
    <xsd:enumeration value="szPaymentTerm"/>
    <xsd:enumeration value="cPaymentInstrument"/>
    <xsd:enumeration value="szAdjustmentSchedule"/>
    <xsd:enumeration value="mnTradeDiscount"/>
    <xsd:enumeration value="szTaxExplanationCode"/>
    <xsd:enumeration value="szTaxArea"/>
    <xsd:enumeration value="szCertificate"/>
    <xsd:enumeration value="cAssociatedText"/>
    <xsd:enumeration value="szHoldOrdersCode"/>
    <xsd:enumeration value="cPricePickListYN"/>
    <xsd:enumeration value="mnInvoiceCopies"/>
    <xsd:enumeration value="mnBuyerNumber"/>
    <xsd:enumeration value="mnCarrier"/>
    We are not able to create a valid structure from the above schema. Our output variable looks like
    Listing 3:
    ns5:jdeRequest
         type
         session
         sessionidle
         ns5:callMethod()
              name
              app
              runOnError
              returnNullData
              trans
              ns5:params
                   ns5:param
                        name
    No variables are displayed under the 'name' tag.
    How can we map the input elements to Listing 2 and produce Listing 1? This is a bit urgent requirement for our client and any help will be greatly appreciated.

    Hi,
    With reference to your question.
    Can any operator perform this task..I don't think any single operator will help you.
    I suggest using an intermediate (staging) table by using a PL SQL procedure with output port to store the values of account number provided the number of accounts are limited. Else use an array variable for account of an employee.
    In short no simple solution because of the bad source design else the pivot/unpivot operator would have helped you.
    Cheers
    - Mohammed

  • ORA-19201: Datatype not supported when validating XML against an XSD

    Hello.
    Info: using Oracle 10.2.0.1.0, Java components are installed.
    I've created an XML view using ora:view, which is validated against a registered XSD. This view is created successfully.
    But when I SELECT * from this view, it gives ORA-19201 - Datatype not supported.
    Can't understand why. I've matched the XML to the XSD, and the datatypes all look fine to me. I've referred to the XSD using the XMLFORMAT.CREATEFORMAT option. When I use the same option to specify "NO_SCHEMA", it returns the correct XML, but we need to validate it against the XSD.
    I'm thinking one of two things has happened here:
    1. I've made a mistake with either my registration, or how I've used XMLFORMAT to refer to the XSD.
    2. There's a bug in Oracle.
    My money's on 1. Can anyone help?
    Thanks,
    Ray.

    Hello Geoff, I didn't want to send any code until I knew someone was willing to look at it (there's a lot of it).
    Here is the XSD:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!--W3C Schema generated by XMLSpy v2006 rel. 3 sp1 (http://www.altova.com)-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
         <xs:element name="TransInfo">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element name="PIE_ERROR" type="PIE_ERRORType" minOccurs="0"/>
                        <xs:element name="Transaction" type="TransactionType" maxOccurs="unbounded"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
         <xs:complexType name="PIE_ERRORType">
              <xs:sequence>
                   <xs:element ref="ERROR_CODE"/>
                   <xs:element ref="DESCRIPTION"/>
              </xs:sequence>
         </xs:complexType>
         <xs:element name="ERROR_CODE">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="0001"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="DESCRIPTION">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="LEAD NUMBER 12345 IS INVALID"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:complexType name="TransactionType">
              <xs:sequence>
                   <xs:element ref="TRANSACTION_NUMBER"/>
                   <xs:element ref="TRANSACTION_STATUS"/>
    <xs:element ref="CONTACT_ID"/>
                   <xs:element ref="INVOICE_NUMBER"/>
                   <xs:element ref="CHANNEL"/>
                   <xs:element ref="CSA"/>
                   <xs:element ref="OPEN_DATETIME"/>
                   <xs:element ref="CLOSED_DATETIME"/>
                   <xs:element name="Orderline" type="OrderlineType" maxOccurs="unbounded"/>
              </xs:sequence>
         </xs:complexType>
         <xs:element name="TRANSACTION_NUMBER">
              <xs:simpleType>
                   <xs:restriction base="xs:int">
                        <xs:enumeration value="3455229"/>
                        <xs:enumeration value="3455230"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="TRANSACTION_STATUS">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="C"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="CONTACT_ID">
              <xs:simpleType>
                   <xs:restriction base="xs:int">
                        <xs:enumeration value="111"/>
                        <xs:enumeration value="222"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="INVOICE_NUMBER">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="123456789"/>
                        <xs:enumeration value="987654321"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="CHANNEL">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="Test 1"/>
                        <xs:enumeration value="Test 2"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="CSA">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="SEARLEA"/>
                        <xs:enumeration value="SILVAJ"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="OPEN_DATETIME">
              <xs:simpleType>
                   <xs:restriction base="xs:dateTime">
                        <xs:enumeration value="2001-10-26T20:32:52"/>
                        <xs:enumeration value="2004-12-06T10:23:25"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="CLOSED_DATETIME">
              <xs:simpleType>
                   <xs:restriction base="xs:dateTime">
                        <xs:enumeration value="2001-10-26T21:32:52"/>
                        <xs:enumeration value="2004-12-06T10:23:25"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:complexType name="OrderlineType">
              <xs:sequence>
                   <xs:element ref="ORDER_QTY"/>
                   <xs:element ref="RETAIL_AMT"/>
                   <xs:element ref="SALE_AMT"/>
                   <xs:element ref="PRODUCT_DESCR"/>
                   <xs:element ref="PART"/>
                   <xs:element ref="IMEI"/>
                   <xs:element name="BankDetails" type="BankDetailsType"/>
              </xs:sequence>
         </xs:complexType>
         <xs:element name="ORDER_QTY">
              <xs:simpleType>
                   <xs:restriction base="xs:int">
                        <xs:enumeration value="1"/>
                        <xs:enumeration value="3"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="RETAIL_AMT">
              <xs:simpleType>
                   <xs:restriction base="xs:decimal">
                        <xs:enumeration value="45.67"/>
                        <xs:enumeration value="54.76"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="SALE_AMT">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="45.67"/>
                        <xs:enumeration value="54.76"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="PRODUCT_DESCR">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="Product test 2"/>
                        <xs:enumeration value="Vodafone Nokia 6230 Pack"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="PART">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="6806"/>
                        <xs:enumeration value="8606"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="IMEI">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="099000000000001"/>
                        <xs:enumeration value="09900078900001"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:complexType name="BankDetailsType">
              <xs:sequence>
                   <xs:element ref="BANK_NAME"/>
                   <xs:element ref="ACCOUNT_NAME"/>
                   <xs:element ref="ACCOUNT_NUMBER"/>
                   <xs:element ref="SORT_CODE"/>
              </xs:sequence>
         </xs:complexType>
         <xs:element name="BANK_NAME">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="HSBC"/>
                        <xs:enumeration value="LLOYDS"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="ACCOUNT_NAME">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="MR A SEARLE"/>
                        <xs:enumeration value="MR J SILVA"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="ACCOUNT_NUMBER">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="87698789"/>
                        <xs:enumeration value="89769082"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="SORT_CODE">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="100928"/>
                        <xs:enumeration value="123346"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
    </xs:schema>
    I then registered this XSD using DBMS_XMLSCHEMA.REGISTER, calling it test_1.xsd. It is visble in USER_XML_SCHEMAS.
    Here are the 15 views used to drive the XML:
    SQL> desc v_pie_branch
    Name Null? Type
    BRANCH NOT NULL NUMBER(4)
    SQL> desc v_pie_branch_feature
    Name Null? Type
    BRANCH_FEATURE NOT NULL NUMBER(10)
    BRANCH NUMBER(4)
    FEATURE_TYPE VARCHAR2(10)
    CHANNEL VARCHAR2(40)
    SQL> desc v_pie_transaction
    Name Null? Type
    TRANSACTION_NUMBER NOT NULL NUMBER(10)
    BRANCH NUMBER(4)
    EMPLOYEE_TRANS VARCHAR2(12)
    CONTACT NUMBER(8)
    OPEN_DAT DATE
    OPEN_TIM DATE
    TRANSACTION_STATUS VARCHAR2(1)
    TRANS_TYPE VARCHAR2(1)
    CLOSED_DAT DATE
    CLOSED_TIM DATE
    INVOICE_NUMBER NUMBER(10)
    INVOICE_DAT DATE
    CSA VARCHAR2(12)
    CREATED_ON DATE
    AMENDED_BY VARCHAR2(12)
    AMENDED_ON DATE
    OPEN_DATETIME VARCHAR2(19)
    CLOSED_DATETIME VARCHAR2(19)
    SQL> desc v_pie_bank_detail
    Name Null? Type
    BANK_DETAIL NOT NULL NUMBER(12)
    BANKCODE VARCHAR2(40)
    SORTCODE VARCHAR2(40)
    BANK_NAME VARCHAR2(60)
    SQL> desc v_pie_account_detail
    Name Null? Type
    ACCOUNT_DETAIL NOT NULL NUMBER(12)
    BANK_DETAIL NUMBER(12)
    ACCOUNT_NUMBER VARCHAR2(40)
    SORT_CODE VARCHAR2(40)
    ACCOUNT_NAME VARCHAR2(40)
    BANKCODE VARCHAR2(40)
    SQL> desc v_pie_account_link
    Name Null? Type
    ACCOUNT_LINK NOT NULL NUMBER(12)
    CONTACT NUMBER(12)
    ACCOUNT_DETAIL NUMBER(12)
    ACC_LINK_TYP NUMBER(12)
    BNK_SINCE DATE
    AC_DET VARCHAR2(40)
    SQL> desc v_pie_compesn
    Name Null? Type
    COMPESN NOT NULL NUMBER(10)
    CONTACT NUMBER(8)
    IMEI VARCHAR2(25)
    SQL> desc v_pie_contact
    Name Null? Type
    CONTACT_ID NOT NULL NUMBER(8)
    CONTACT_TYP VARCHAR2(1)
    COMPANY NUMBER(10)
    BRANCH NUMBER(4)
    DEAD_FLG VARCHAR2(1)
    FORENAME VARCHAR2(20)
    TITLE VARCHAR2(5)
    MID_INITIAL VARCHAR2(1)
    GENDER VARCHAR2(1)
    FRAUD_FLG VARCHAR2(1)
    SQL> desc v_pie_servcon
    Name Null? Type
    SERVCON NOT NULL NUMBER(10)
    CONTRACT NUMBER(10)
    CONNECTION_CURR NUMBER(10)
    CONTACT NUMBER(8)
    SQL> desc v_pie_tpplan_compline
    Name Null? Type
    TPPLAN_COMPLINE NOT NULL NUMBER(10)
    SERVCON NUMBER(10)
    PPLAN NUMBER(10)
    SQL> desc v_pie_tpplan_comp_detail
    Name Null? Type
    TPPLAN_COMPLINE NOT NULL NUMBER(10)
    RULE_DETAIL_NO NOT NULL VARCHAR2(5)
    RULE_DETAIL_LINE NOT NULL NUMBER(2)
    U_VERSION VARCHAR2(1)
    OPTION VARCHAR2(40)
    OPT_STRING VARCHAR2(40)
    SQL> desc v_pie_tpplan
    Name Null? Type
    SERVCON NOT NULL NUMBER(10)
    PPLAN NOT NULL NUMBER(10)
    U_VERSION VARCHAR2(1)
    SQL> desc v_pie_connection
    Name Null? Type
    CONNECTION NOT NULL NUMBER(10)
    CONTACT NUMBER(8)
    ADDRESSNO NUMBER(5)
    TRANSACTION NUMBER(10)
    TPRODLINE NUMBER(10)
    CONTRACT NUMBER(10)
    SERVCON NUMBER(10)
    SQL> desc v_pie_tprodline
    Name Null? Type
    TRANSACTION NOT NULL NUMBER(10)
    TPRODLINE NOT NULL NUMBER(10)
    CONTACT NUMBER(8)
    PRODUCT NUMBER(10)
    ORDER_QTY NUMBER(12)
    RETAIL_AMT NUMBER
    SALE_AMT NUMBER
    SQL> desc v_pie_product
    Name Null? Type
    PRODUCT NOT NULL NUMBER(10)
    PART VARCHAR2(20)
    PRODUCT_DESCR VARCHAR2(40)
    This is the code to create an XML view, validating against the schema:
    create OR REPLACE VIEW v_xml_validate AS
    SELECT SYS_XMLAGG(XMLQuery('
    <PIE_ERROR>
    <ERROR_CODE>"0001"</ERROR_CODE>
    <DESCRIPTION>"There was an error with this customer"</DESCRIPTION>
    </PIE_ERROR>,
    <Transaction>
    {for $t in ora:view("V_PIE_TRANSACTION")/ROW
        ,$ct in ora:view("V_PIE_CONTACT")/ROW
        ,$b in ora:view("V_PIE_BRANCH")/ROW
        ,$bf in ora:view("V_PIE_BRANCH_FEATURE")/ROW
    where $t/CONTACT = $ct/CONTACT_ID
    and   $t/BRANCH = $b/BRANCH
    and   $b/BRANCH = $bf/BRANCH
    return ($t/TRANSACTION_NUMBER
            ,$t/TRANSACTION_STATUS
            ,$ct/CONTACT_ID
            ,$t/INVOICE_NUMBER
            ,$bf/CHANNEL
            ,$t/CSA
            ,$t/OPEN_DATETIME
            ,$t/CLOSED_DATETIME
            ,<Orderline>
                  {for $tpl in ora:view("V_PIE_TPRODLINE")/ROW
                      ,$pr  in ora:view("V_PIE_PRODUCT")/ROW
                      ,$cmpesn  in ora:view("V_PIE_COMPESN")/ROW
                   where $tpl/TRANSACTION eq $t/TRANSACTION_NUMBER
                   and   $tpl/PRODUCT eq $pr/PRODUCT
                   and   $ct/CONTACT_ID eq $cmpesn/CONTACT
                   return ($tpl/ORDER_QTY
                          ,$tpl/RETAIL_AMT
                          ,$tpl/SALE_AMT
                          ,$pr/PRODUCT_DESCR
                          ,$pr/PART
                          ,$cmpesn/IMEI
                          ,<BankDetails>
                               {for $conn in ora:view("V_PIE_CONNECTION")/ROW
                                for $scon in ora:view("V_PIE_SERVCON")/ROW
                                for $tpp in ora:view("V_PIE_TPPLAN")/ROW
                                for $tppc in ora:view("V_PIE_TPPLAN_COMPLINE")/ROW
                                for $tppcd in ora:view("V_PIE_TPPLAN_COMP_DETAIL")/ROW
                                for $al in ora:view("V_PIE_ACCOUNT_LINK")/ROW
                                for $ad in ora:view("V_PIE_ACCOUNT_DETAIL")/ROW
                                for $bd in ora:view("V_PIE_BANK_DETAIL")/ROW
                                where $conn/CONTACT eq $ct/CONTACT_ID
                                and   $scon/CONTACT eq $conn/CONTACT
                                and   $tpp/SERVCON eq $scon/SERVCON
                                and   $tppc/SERVCON eq $tpp/SERVCON
                                and   $tppc/PPLAN eq $tpp/PPLAN
                                and   $tppcd/TPPLAN_COMPLINE eq $tppc/TPPLAN_COMPLINE
                                and   $al/AC_DET eq $tppcd/OPT_STRING
                                and   $ad/ACCOUNT_DETAIL eq $al/ACCOUNT_DETAIL
                                and   $bd/BANK_DETAIL eq $ad/BANK_DETAIL
                                return ($bd/BANK_NAME
                                       ,$ad/ACCOUNT_NAME
                                       ,$ad/ACCOUNT_NUMBER
                                       ,$ad/SORT_CODE
    </BankDetails>
    </Orderline>
    </Transaction>'
    RETURNING CONTENT),
    XMLFORMAT.CREATEFORMAT('TransInfo','USE_GIVEN_SCHEMA','test_1.xsd', 'http://xmlns.cpw.co.uk/CPW/EPOS/Order/RetrieveTransaction/RetrieveTransaction', NULL, NULL)) AS xml_string FROM DUAL;
    The view is created with no errors. Selecting * from it, however, gives:
    ORA-19201 - Datatype not supported
    Marrying the XML to the XSD shows nothing obviously wrong.
    Thanks,
    Ray.

  • Validation against schema problem

    Having a problem validating a sample instance of my schema using the schemaValidate() API, in fact the sample app xsdtest fails as well.
    xsdtest reports:
    In line 8 of sample.xml:
    LSX-00204: extra data at end of complex element
    Validation failed, error 204
    --- sample.xml ---
    <?xml version="1.0" encoding="UTF-8"?>
    <XMLConfig
              xmlns="http://www.foo.com/Config"
              xmlns:cfg="http://www.foo.com/Config"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:noNamespaceSchemaLocation="xmlconfig.xsd">
         <!--<xsd:include schemaLocation=""/>-->
         <hostname>localhost</hostname>
         <server>
              <IPv4>127.0.0.1</IPv4>
         </server>               
    </XMLConfig>
    Line 8: contains a comment, why a failure ? In fact having any element from the schema placed there causes this error, the only time the sample instance was valid is having nothing between <XMLConfig></XMLConfig>.
    XMLSpy validates the document fine so either them or XDK have a parser problem. Any help appreciated, thanks.
    ---xmlconfig.xsd---
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Namespace definitions -->
    <xs:schema
                        targetNamespace="http://www.foo.com/Config"
                        xmlns:cfg="http://www.foo.com/Config"
                        xmlns:xs="http://www.w3.org/2001/XMLSchema"
                        elementFormDefault="qualified"
                        attributeFormDefault="unqualified"
                        version="1.0">
         <xs:element name="XMLConfig">
              <xs:annotation>
                   <xs:documentation xml:lang="en">XML Based Configuration</xs:documentation>
              </xs:annotation>
              <xs:complexType mixed="true">          
                   <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <!-- cfg elements -->
                        <xs:element name="filePath"           type="cfg:filePath"/>
                        <xs:element name="hostname"           type="cfg:hostname"/>
                        <xs:element name="IPv4"           type="cfg:IPv4"/>                    
                        <xs:element name="server"          type="cfg:server"/>
                   </xs:choice>
              </xs:complexType>
         </xs:element>
         <!-- File Path (Windows/Unix) -->
         <xs:simpleType name="filePath">
              <xs:annotation>
                   <xs:documentation xml:lang="en">
                        System file path
                   </xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:anyURI">
                   <xs:minLength value="1"/>
                   <xs:maxLength value="16384"/>
              </xs:restriction>
         </xs:simpleType>
         <!-- IPv4 address (RFC791) -->
         <xs:simpleType name="IPv4">
              <xs:annotation>
                   <xs:documentation xml:lang="en">
                   Internet Protocol V4 (IPv4) address
                   </xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:minLength value="1"/>
                   <xs:maxLength value="15"/>
                   <xs:pattern value="((([01]?\d\d?|2[0-4]\d|25[0-5])\.){3,5}([01]?\d\d?|2[0-4]
                                                           \d|25[0-5]))"/>
              </xs:restriction>
         </xs:simpleType>
         <!-- Hostname (RFC952) -->
         <xs:simpleType name="hostname">
              <xs:annotation>
                   <xs:documentation xml:lang="en">
                   Machine hostname constructed using RFC952 rules.
                   </xs:documentation>
              </xs:annotation>
              <xs:restriction base="xs:string">
                   <xs:minLength value="1"/>
                   <xs:maxLength value="255"/>
                   <xs:pattern value="([a-zA-Z][a-zA-Z0-9\-\.]*[a-zA-Z0-9])"/>
              </xs:restriction>
         </xs:simpleType>
         <!-- Server type (Hostname or IP Address) -->
         <xs:complexType name="server">
              <xs:annotation>
                   <xs:documentation xml:lang="en">
                   Hostname or IPAddress
                   </xs:documentation>
              </xs:annotation>               
              <xs:choice>
                   <xs:element name="hostname"      type="cfg:hostname"/>
                   <xs:element name="IPv4"      type="cfg:IPv4"/>
              </xs:choice>                    
         </xs:complexType>
    </xs:schema>

    Where does one lookup bugs/issues, mind that I am not an Oracle employee or customer ?
    Maybe if it's not getting adressed/fixed in the near future, people can avoid triggering this bug by knowing what causes it. I'd appreciate at least getting to the description of the problem so that I can re-format documents/schema accordingly and still be able to use XDK with schema validation capability.
    Regards,
    Amir

  • Validating against schema file for the output XML file

    Hi,
      I am using XSLT for mapping. The output message is generated according to the mappings but it is not validate aganist schema of target . I am using xsd file from external defination section as target. Can any body help me in this regard.
    Thanks,
    Mallikarjun.M

    hi,
    if you talk about the schema of a target message type
    than validation only works if you use graphical
    message mapping
    not with: xslt,java, abap
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Error while compiling schema using JAXB 1.0.2 to

    Hi ,
    Please help ! i am trying to compile my schema using JAXB1.0.2 (bundled with Java Web Services Developer Pack 1.3 ) .I am getting a java.util.MissingResourceException . Can anyone help as to which portion of the schema i should look at.Here are the error details.
    thanks
    Rahul
    parsing a schema...
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
    Caused by: java.util.MissingResourceException: Can't find resource for bundle ja
    va.util.PropertyResourceBundle, key parser.cc.8
    at java.util.ResourceBundle.getObject(ResourceBundle.java:314)
    at java.util.ResourceBundle.getString(ResourceBundle.java:274)
    at com.sun.msv.datatype.xsd.regex.RegexParser.ex(RegexParser.java:138)
    at com.sun.msv.datatype.xsd.regex.ParserForXMLSchema.parseCharacterClass
    (ParserForXMLSchema.java:291)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseAtom(RegexParser.java
    :736)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseFactor(RegexParser.ja
    va:638)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseTerm(RegexParser.java
    :342)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parseRegex(RegexParser.jav
    a:320)
    at com.sun.msv.datatype.xsd.regex.RegexParser.parse(RegexParser.java:158
    at com.sun.msv.datatype.xsd.regex.RegularExpression.setPattern(RegularEx
    pression.java:3040)
    at com.sun.msv.datatype.xsd.regex.RegularExpression.setPattern(RegularEx
    pression.java:3051)
    at com.sun.msv.datatype.xsd.regex.RegularExpression.<init>(RegularExpres
    sion.java:3017)
    at com.sun.msv.datatype.xsd.PatternFacet.compileRegExps(PatternFacet.jav
    a:79)
    at com.sun.msv.datatype.xsd.PatternFacet.<init>(PatternFacet.java:67)
    at com.sun.msv.datatype.xsd.TypeIncubator.derive(TypeIncubator.java:261)
    at com.sun.tools.xjc.reader.xmlschema.DatatypeBuilder.restrictionSimpleT
    ype(DatatypeBuilder.java:82)
    at com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl.apply(RestrictionSimp
    leTypeImpl.java:66)
    at com.sun.tools.xjc.reader.xmlschema.DatatypeBuilder.build(DatatypeBuil
    der.java:65)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.buildPrimitiveTy
    pe(SimpleTypeBuilder.java:161)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.access$100(Simpl
    eTypeBuilder.java:50)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder$Functor.checkCon
    version(SimpleTypeBuilder.java:201)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder$Functor.restrict
    ionSimpleType(SimpleTypeBuilder.java:276)
    at com.sun.xml.xsom.impl.RestrictionSimpleTypeImpl.apply(RestrictionSimp
    leTypeImpl.java:66)
    at com.sun.tools.xjc.reader.xmlschema.SimpleTypeBuilder.build(SimpleType
    Builder.java:93)
    at com.sun.tools.xjc.reader.xmlschema.cs.DefaultClassBinder.simpleType(D
    efaultClassBinder.java:130)
    at com.sun.xml.xsom.impl.SimpleTypeImpl.apply(SimpleTypeImpl.java:89)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector._bindToClass(Clas
    sSelector.java:212)
    at com.sun.tools.xjc.reader.xmlschema.cs.ClassSelector.bindToType(ClassS
    elector.java:177)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.populate(BGMBuilder.jav
    a:254)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.buildContents(BGMBuilde
    r.java:223)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder._build(BGMBuilder.java:
    116)
    at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:8
    0)
    at com.sun.tools.xjc.GrammarLoader.annotateXMLSchema(GrammarLoader.java:
    424)
    at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:130)
    at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:79)
    at com.sun.tools.xjc.Driver.run(Driver.java:177)
    at com.sun.tools.xjc.Driver._main(Driver.java:80)
    at com.sun.tools.xjc.Driver.access$000(Driver.java:46)
    at com.sun.tools.xjc.Driver$1.run(Driver.java:60)

    Hi,
    A similar problem occur to me once.
    In that case it was that I copied the files from:
    JWSDP_HOME\jaxb\lib
    to
    JAVA_HOME\jre\lib\endorsed
    when I shouldn�t.
    I should take the files only from JWSDP_HOME\jwsdp-sahred\lib\endorsed
    So try taking the files:
    jaxb-api.jar
    jaxb-impl.jar
    jaxb-xjc.jar
    jaxb-libs.jar
    out of the JAVA_HOME\jre\lib\endorsed directory living them only in jaxb\lib where they should be.
    Try that, and let�s see if the compilation improves.

  • Erro in XML validation with schema document.

    Hi Friends,
    I am trying to validate XML file as per the defined schema document through JAXB parser.
    Following is my xml. schema and java class code.
    XML File_
    <?xml version="1.0"?>
    <notify xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="NotificationDetailsSchema.xsd">
    <notification>
    <alertname>Alert1</alertname>
    <deletable>Y</deletable>
    <descurl>Alert1URL</descurl>
    </notification>
    <notification>
    <alertname>Alert2</alertname>
    <deletable>Y</deletable>
    <descurl>Alert2URL</descurl>
    </notification>
    </notify>
    Schema file_
    <?xml version="1.0" encoding="windows-1252"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <xsd:element name="notify">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="notification" maxOccurs="unbounded">
    <xsd:complexType mixed="true">
    <xsd:sequence>
    <xsd:element name="alertname">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="deletable">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:pattern value="Y|N"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    <xsd:element name="descurl">
    <xsd:simpleType>
    <xsd:restriction base="xsd:string">
    <xsd:minLength value="1"/>
    </xsd:restriction>
    </xsd:simpleType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    Java Class_
    SAXSource source = new SAXSource (xmlInputSource);
    SchemaFactory sf = SchemaFactory.newInstance (XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = sf.newSchema(schemaFileObj);
    Validator validator = schema.newValidator ();
    validator.setErrorHandler (new ParserErrorHandler());
    validator.validate (source);
    I tried to execute the validation through stand along java class and it worked correctly.
    However when I added this class into my Fusion web application, I am getting following error.
    org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw 'USAVER'.*
    Can you please help me to figure out this problem?

    Ruskin wrote:
    However there needs to be the possibility of a totally random mix of three different types of elements in a parent element. Can you take your example to make it more clear? Does all three elements mutually exclusive?

Maybe you are looking for

  • [Solved] I can't get vim to save my selected colour theme

    Have pity upon a Vim acolyte!  I have looked through the Arch Wiki documentation and I have completed vim's excellent "vimtutor" program.  Both have been immensely helpful but I still have these issues and I'm not sure where to look for the solutions

  • When I open a PDF file and I try to Save As to my shared drive I can't select it from the dropdown

    When I open a PDF file and I try to Save As to my shared drive I can't select it from the dropdown menu. (See screenshot). When I select on the left side "Computer", then my shared drive is available. (See screenshot).

  • ITunes keeps opening itself up, how do I stop it?!

    Okay all I've become more than irritated by iTunes lately. Every time I go to click the x in the upper right hand corner, or even go "File" then "Exit" every thirty seconds or so after I close out iTunes it unbeknown to me opens itself back up. I've

  • Cannot find the new binding

    Hi !! I am using jdeveloper 11.1.1.5!! I had dragged and dropped mu OpcLoseId [an LOV] from my OpportHd table in a af:form. I had passed this value as a parameter to my AMImpl Method. So that while my user clicks the button this method get executed.

  • When do i get a confirmation mail ( iPhone 4S )

    Hello, on Friday (about 7 o'clock ) I preordered an iPhone 4S as a guest ! I still haven't got any confirmation mail, do you think that this is normal ?