Schema validation in WL 9.1

I am using WL 9.1 and i get the following errors while validating the schema
[webddr] XMLParser - file:///C:/dev/artfrank_Core_4_2_int/WFX_Core/core/stagi
ng/resource/auth-service-war/WEB-INF/weblogic.xml (L2,C61): Document root elemen
t "weblogic-web-app", must match DOCTYPE root "null".
[webddr] 07 Aug 2006 10:11:43.654 ERROR XMLParser - file:///C:/dev/artfrank_
Core_4_2_int/WFX_Core/core/staging/resource/auth-service-war/WEB-INF/weblogic.xm
l (L2,C61): Document root element "weblogic-web-app", must match DOCTYPE root "n
ull".
[webddr] XMLParser - file:///C:/dev/artfrank_Core_4_2_int/WFX_Core/core/stagi
ng/resource/auth-service-war/WEB-INF/weblogic.xml (L2,C61): Document is invalid:
no grammar found.
[webddr] 07 Aug 2006 10:11:43.654 ERROR XMLParser - file:///C:/dev/artfrank_
Core_4_2_int/WFX_Core/core/staging/resource/auth-service-war/WEB-INF/weblogic.xm
l (L2,C61): Document is invalid: no grammar found.
Here is the weblogic.xml that i use
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
I have also tried it with
<weblogic-web-app
xmlns="http://www.bea.com/ns/weblogic/90"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/90
http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
Basically, it is trying to look for the DOCTYPE tag? Any suggestions?

I too am having the same problem. Any help?
thanks

Similar Messages

  • Getting schema validation working in Eclipse with Coherence 3.7.1.0

    Just wondered if anyone had got schema validation to work in Eclipse (3.5 - Galileo) for Coherence 3.7.1.0?
    The Coherence developer docs show that you should add sections like this:
    <pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config
    coherence-pof-config.xsd">
    However, if I use that "shortened" form (for cache, pof, etc. configs) Eclipse gives a warning "No grammar constraints (DTD or XML schema) detected for the document." and the schema validation fails to work (i.e. no "auto pop-ups" when entering content, and rubbish content is gladly accepted.)
    In Coherence 3.7.0, I'd used the following "extended" form (note the longer "schemaLocation") to get things working correctly:
    <pof-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-pof-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-pof-config
    http://xmlns.oracle.com/coherence/coherence-pof-config/1.0/coherence-pof-config.xsd">
    Also note that entering the "http://xmlns.oracle.com/coherence/coherence-pof-config/1.0/coherence-pof-config.xsd" in a web browser opens the xsd, as you'd expect.
    Now...
    I'm looking at the PofAnnotationSerializer in 3.7.1.0 and the "auto indexing" option. The declaration in my pof file for it fails as the "class" (or fully-qualified java.lang.Class version) in the "init-params" section isn't valid. If I look at the xsd on the url above, this is indeed the case, that option does not appear.
    However, if I look at the POF xsd in the coherence.jar file for 3.7.1.0, the "class" option has been added, and has a newer 'version="1.1"' added to it's schema declaration. So I therefore tried to point my "extended" declaration to point to " http://xmlns.oracle.com/coherence/coherence-pof-config/1.1/coherence-pof-config.xsd", in order to get schema validation to work in Eclipse with this new schema. Unfortunately that url doesn't exist - you get a "Content Server Request Failed" error.
    So, I guess my question is, is there a way to get myself pointed at the 1.1 versions of the xsd's so I can have schema validation working in Ecliipse? Or is there another workaround (did a bit of Googling, but that mainly seemed to be people switching validation off to simply get rid of the error...)
    Cheers,
    Steve

    Cheers, Dave.
    I had in fact had a try at extracting the xsd and pointing to it directly, and that did indeed work (had to do this following the same steps shown below using an "entry" in the XML Catalog.)
    I had a look around at some of the other "entries" in Eclipse by default and noticed that they actually refer to xsd's directly within the jars, hence saving the extraction step and keeping screw-ups down to a minimum; a bit of playing around to get the syntax right and I finally managed to get it working.
    For those who are interested (NB. my Coherence 3.7.1.0 install is in a directory "c:\coherence3.7"), the steps are:
    In Eclipse, Go to Window->Preferences->XML->XML Catalog. Then create a "User Specified Entry".
    In the "Location", add (without the quotes): "jar:file:/C:/coherence3.7/coherence/lib/coherence.jar!/coherence-pof-config.xsd"
    In the "Key Type", add (without the quotes): "Namespace Name"
    In the "Key", add (without the quotes): "http://xmlns.oracle.com/coherence/coherence-pof-config"
    The schema validation now works fine. Eclipse shows no warnings/errors, and the auto-complete and validation are fully functional.
    Still, it would be nice to get the "1.1" urls updated to point to the schemas on the Oracle site, to avoid all our developers from having to make these changes (and of course avoid them pointing at an older, out-of-date local install of coherence.)
    Cheers,
    Steve

  • Schema Validator does not honor "nullable" attribute

    Oracle XML Schema validator v1.0 does not seem to honor "nullable" schema attribute as in:
    <xsd:element name='myelem' type='xsd:string' nullable='true'/>
    On input
    <myelem/> or <myelem></myelem>
    it reports:
    Element not completed: 'myelem'
    Thanks
    null

    My mistake. Input must be specified as:
    <myelem xsi:null="true">
    where
    xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance"
    null

  • Error : Catalog object schema validation failed in OBIEE 11.1.1.5

    Hi all ,
    Facing the below error while accessing few reports present in a folder (Voice Tab) . But , able to access other reports present in the same folder .
    Catalog object schema validation failed: /users/weblogic/sayak/TPLAN reports/Voice Tab/Net revenue per minute (ILD\/NLD)
    Error Details
    Error Codes: AGFIXBO2:EIRWWH9E
    Location: saw.httpserver.processrequest, saw.rpc.server.responder, saw.rpc.server, saw.rpc.server.handleConnection, saw.rpc.server.dispatch, saw.threadpool, saw.threadpool, saw.threads
    Also while try to edit the analysis (Net revenue per minute (ILD\/NLD) from catalog , i am getting the above error .The Reports were fine till yesterday , What could be the issue ?
    Thanks

    Hi Devarasu ,
    Yeah .. I'm aware of this bug of 11.1.1.5 , but I'm puzzeled by the sudden impact of it . i.e , It didn't gave me the error while creating/editing the file yesterday and looked fine on dashboard as well .
    However , If there's no alternative other than applying patch , then please let me know the patch ID .
    And applying this patch means , just overwriting some configure files in the OBIEE home folder sructure ? or somthing else ?
    Thanks

  • "Schema validation found non-data type errors" error when passing a string value to date field in infopath

    Hi,
    I have an infopath web brower enabled form. In the form i have a date field.
    I am passing the data from the database to that field using the C# code.
    But, as the field from database is coming as string, i am getting an error, and i am not able to assign the value.
    I get the date value from database as "3/25/2011 12:00:00 AM"
    I used the below code:
    [CODE]
    if (objInfopathFormcData.myRecievedDate != null)
      myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager).SetValue(objInfopathFormcData.myRecievedDate);
    [/CODE]
    I am getting the error as "Schema validation found non-data type errors".
    How to set the value for a date field in Infopath.
    Thank you

    HI,
    I fixed it:
    Below code is used to fix:
    [CODE]
    XPathNavigator xfield = null;
    DateTime dtmyRecievedDate;
    dtmyRecievedDate = Convert.ToDateTime(objInfopathFormcData.myRecievedDate);
    if (objFormcData.FcCompletionDate != null)
    xfield = myRoot.SelectSingleNode("/my:myFields/my:field97", NamespaceManager);
    DeleteNil(xfield);
    xfield.SetValue(dtmyRecievedDate.GetDateTimeFormats().GetValue(5).ToString());
    // method to delete xsi:nil
    private void DeleteNil(XPathNavigator nav1)
    if (nav1.MoveToAttribute("nil", "http://www.w3.org/2001/XMLSchema-instance"))
       nav1.DeleteSelf();
    [/CODE]
    Thank you

  • Processing Schema Validation error in BPM?

    Hi all,
    We have a file to IDOC scenario where if the schema validation fails on the file adapter sender agreement, we want to pull the filename and send it in an error email. So, we are talking about the adapter specific message attribute "Filename".
    unfortunately, this does not seem to be available as a container element for alert catagories in ALRTCATDEF. So, we are starting to look into using BPM to send a email via the email adapter. However, since the validation happens prior to BPM being called I am at a bit of a loss. Any ideas on how to get the email with the filename out to the suport group would be appreciated.
    Thanks,
    Chris

    package com.validate;
    import com.sap.aii.mapping.api.*;
    import com.sap.aii.mappingtool.tf7.rt.Container;
    import java.io.*;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.*;
    public class ValidateXML extends AbstractTransformation {
        public void transform(TransformationInput transformationInput, TransformationOutput transformationOutput) throws StreamTransformationException {
            OutputStream outputstream = null;
            try {
                InputStream inputstream = transformationInput.getInputPayload().getInputStream();
                outputstream = transformationOutput.getOutputPayload().getOutputStream();
                byte[] b = new byte[inputstream.available()];
                inputstream.read(b);
                String XMLinputFileContent = new String(b);
                // define the type of schema - we use W3C:
                String schemaLang = "http://www.w3.org/2001/XMLSchema";
                // get validation driver:
                SchemaFactory factory = SchemaFactory.newInstance(schemaLang);
                //Place XSD file in PI server same as http://help.sap.com/saphelp_nwpi711/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/frameset.htm
                //OR I think you can place any where on server.
                File XSDfile = new File("C:/xi/runtime_server/validation/schema/SchemaFile.xsd");
                // create schema by reading it from an XSD file:
                Schema schema = factory.newSchema(new StreamSource(XSDfile));
                Validator validator = schema.newValidator();
                // at last perform validation:
                validator.validate(new StreamSource(XMLinputFileContent));
                //If XML it not valid, exception will be thrown, if it is valid sent this PassOutputXML to output
                String PassOutputXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns:MT_OutputXML xmlns:ns=\"http://sap.com/xi\"> <Name>FileName.txt</Name><Validation>Pass</Validation> </ns:MT_OutputXML>";
                outputstream.write(PassOutputXML.getBytes());
            } catch (Exception exception) {
                //Get File name using http://help.sap.com/saphelp_nwpi711/helpdata/en/43/03612cdecc6e76e10000000a422035/frameset.htm
                Container container = null;
                DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
                String inputFileName = conf.get(key);
                String FailOutputXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns:MT_OutputXML xmlns:ns=\"http://sap.com/xi\"> <Name>" + inputFileName + "</Name><Validation>Fail</Validation> </ns:MT_OutputXML>";
                try {
                    outputstream.write(FailOutputXML.getBytes());
                } catch (IOException ex) {
                    exception.printStackTrace();
                    ex.printStackTrace();

  • Schema Validation failure in SOA Suite 11.1.1.6.0 but not in 11.1.1.7.0

    I have a composite that is deployed on both a SOA Suite 11.1.1.6.0 and 11.1.1.7.0 server.
    The composite exposes a service that my application subscribes to and sends messages to so the BPMN process can handle the request.
    This works fine in 11.1.1.7.0.  However, in the older version, when the message gets sent out, I'm getting the error shown below.
    I've made sure that Schema Validation is disabled on all of the endpoints, but that doesn't appear to have any affect.  Any thoughts?
    <Aug 29, 2013 12:00:59 PM EDT> <Error> <oracle.webservices.service> <OWS-04115><An error occurred for port: FabricProvider: javax.xml.rpc.soap.SOAPFaultException: Schema validation failed for message part parameters. Please ensure at the message sender level that the data sent is schema compliant. Attribute 'http://schemas.xmlsoap.org/soap/envelope/:encodingStyle' not expected..>
    <Aug 29, 2013 12:01:00 PM EDT> <Error> <oracle.webservices.service> <OWS-04086>
    <javax.xml.rpc.soap.SOAPFaultException: Schema validation failed for message part parameters. Please ensure at the message sender level that the data sent is schema compliant. Attribute 'http://schemas.xmlsoap.org/soap/envelope/:encodingStyle' not expected.
            at oracle.integration.platform.blocks.soap.WebServiceEntryBindingCompone
    nt.generateSoapFaultException(WebServiceEntryBindingComponent.java:1193)
            at oracle.integration.platform.blocks.soap.WebServiceEntryBindingCompone
    nt.processIncomingMessage(WebServiceEntryBindingComponent.java:971)
            at oracle.integration.platform.blocks.soap.FabricProvider.processMessage
    (FabricProvider.java:113)
            at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing
    (ProviderProcessor.java:1187)
            at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementatio
    n(WebServiceProcessor.java:1112)
            at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(
    ProviderProcessor.java:581)
            at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServicePr
    ocessor.java:233)
            at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcess
    or.java:193)
    Thanks,
    Mike

    Any suggestions on this....

  • Error in schema validation in XI. Please help!

    Hi Experts,
       I have a FILE to proxy scenario. In the sender agreement I have selected schema validation by Adapter. (Other option is by Integration Engine). Now when the file I get an error in sender file communication channel monitoring:
    Error: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: Schema DataIn.xsd not found in D:\usr\XXXXXXXXX\validation\schema\31f7c36098e411deadcae4d30a13c639\httptraining-00EIM_POC\DataIn_Async_Out\httptraining-00EIM_POC\DataIn.xsd  (validation\schema)
    Do I need to keep the schema file in some server location?  Do I need to setup this path anywhere? Where do I need to place the schema file?
    What is the difference between validation by adapter and by integration engine?
    Please help!
    Thanks
    Gopal

    >What is the difference between validation by adapter and by integration engine?
    Both are same. One in Java engine and the other in the abap engine.  If you set at one place that is good enough.  In 7.1+  this becomes one of the pipeline steps.
    >Do I need to keep the schema file in some server location? Do I need to setup this path anywhere? Where do I need to place the schema file
    Yes you have to place schema in the server location.
    Refer the Rajasekar document for the placing this file in the server location.

  • Persisting unexplained errors when parsing XML with schema validation

    Hi,
    I am trying to parse an XML file including XML schema validation. When I validate my .xml and .xsd in NetBeans 5.5 beta, I get not error. When I parse my XML in Java, I systematically get the following errors no matter what I try:
    i) Document root element "SQL_STATEMENT_LIST", must match DOCTYPE root "null".
    ii) Document is invalid: no grammar found.
    The code I use is the following:
    try {
    Document document;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File(PathToXml) );
    My XML is:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!-- Defining the SQL_STATEMENT_LIST element -->
    <xs:element name="SQL_STATEMENT_LIST" type= "SQL_STATEMENT_ITEM"/>
    <xs:complexType name="SQL_STATEMENT_ITEM">
    <xs:sequence>
    <xs:element name="SQL_SCRIPT" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <!-- Defining simple type ApplicationType with 3 possible values -->
    <xs:simpleType name="ApplicationType">
    <xs:restriction base="xs:string">
    <xs:enumeration value="DawningStreams"/>
    <xs:enumeration value="BaseResilience"/>
    <xs:enumeration value="BackBone"/>
    </xs:restriction>
    </xs:simpleType>
    <!-- Defining the SQL_SCRIPT element -->
    <xs:element name="SQL_SCRIPT" type= "SQL_STATEMENT"/>
    <xs:complexType name="SQL_STATEMENT">
    <xs:sequence>
    <xs:element name="NAME" type="xs:string"/>
    <xs:element name="TYPE" type="xs:string"/>
    <xs:element name="APPLICATION" type="ApplicationType"/>
    <xs:element name="SCRIPT" type="xs:string"/>
    <!-- Making sure the following element can occurs any number of times -->
    <xs:element name="FOLLOWS" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    and my XML is:
    <?xml version="1.0" encoding="UTF-8"?>
    <!--
    Document : SQLStatements.xml
    Created on : 1 juillet 2006, 15:08
    Author : J�r�me Verstrynge
    Description:
    Purpose of the document follows.
    -->
    <SQL_STATEMENT_LIST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.dawningstreams.com/XML-Schemas/SQLStatements.xsd">
    <SQL_SCRIPT>
    <NAME>CREATE_PEERS_TABLE</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE CACHED TABLE PEERS (
    PEER_ID           VARCHAR(20) NOT NULL,
    PEER_KNOWN_AS      VARCHAR(30) DEFAULT ' ' ,
    PRIMARY KEY ( PEER_ID )
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>CREATE_COMMUNITIES_TABLE</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE CACHED TABLE COMMUNITIES (
    COMMUNITY_ID VARCHAR(20) NOT NULL,
    COMMUNITY_KNOWN_AS VARCHAR(25) DEFAULT ' ',
    PRIMARY KEY ( COMMUNITY_ID )
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>CREATE_COMMUNITY_MEMBERS_TABLE</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE CACHED TABLE COMMUNITY_MEMBERS (
    COMMUNITY_ID VARCHAR(20) NOT NULL,
    PEER_ID VARCHAR(20) NOT NULL,
    PRIMARY KEY ( COMMUNITY_ID, PEER_ID )
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>DROP_PEER_TABLE</NAME>
    <TYPE>DELETION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    DROP TABLE PEERS IF EXISTS
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>DROP_COMMUNITIES_TABLE</NAME>
    <TYPE>DELETION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    DROP TABLE COMMUNITIES IF EXISTS
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>DROP_COMMUNITY_MEMBERS_TABLE</NAME>
    <TYPE>DELETION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    DROP TABLE COMMUNITY_MEMBERS IF EXISTS
    </SCRIPT>
    </SQL_SCRIPT>
    <SQL_SCRIPT>
    <NAME>CREATE_COMMUNITY_MEMBERS_VIEW</NAME>
    <TYPE>CREATION</TYPE>
    <APPLICATION>DawningStreams</APPLICATION>
    <SCRIPT>
    CREATE VIEW COMMUNITY_MEMBERS_VW AS
    SELECT P.PEER_ID, P.PEER_KNOWN_AS, C.COMMUNITY_ID, C.COMMUNITY_KNOWN_AS
    FROM PEERS P, COMMUNITIES C, COMMUNITY_MEMBERS CM
    WHERE P.PEER_ID = CM.PEER_ID
    AND C.COMMUNITY_ID = CM.COMMUNITY_ID
    </SCRIPT>
    <FOLLOWS>CREATE_PEERS_TABLE</FOLLOWS>
    <FOLLOWS>CREATE_COMMUNITIES_TABLE</FOLLOWS>
    </SQL_SCRIPT>
    </SQL_STATEMENT_LIST>
    Any ideas? Thanks !!!
    J�r�me Verstrynge

    Hi,
    I found the solution in the following post:
    Validate xml with DOM - no grammar found
    Sep 17, 2003 10:58 AM
    The solution is to add a line of code when parsing:
    try {
    Document document;
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setValidating(true);
    factory.setNamespaceAware(true);
    factory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse( new File(PathToXml) );
    The errors are gone !!!
    J�r�me Verstrynge

  • Help On schema validation

    Hi,
    I am a newbie in XML schema territory.
    I generates a xml using 'SELECT XMLQuery( ...)' -- This finally works after upgrading to 10.2.0.3!
    1) What methods do you recommend to validate the query result agaist the schema? The query result is first returned as 'XMLType' type, and then
    I turned it into a CLOB.
    At the end, I save the output into a file (via CLOB to String).
    2) How do I register the schema in DB? Can I install the schema on the file system, instead? I am not sure which way is simpler and easier. I'd yearn for any simpler method, if any --- a common complaint from any beginner, I guess.
    A few pointers will help me a great deal.
    Sun

    Sun,
    You can take a look at an FAQ thread on this topic: How does XML DB handle XML Schema Validation ?
    Regards,
    Geoff

  • Java Stored Procedure SAXParser XML Schema Validation

    Using Oracle XML Developers Kit 10.2.0.2.0 - Production.
    Attempting to validate using XML Schema in a Java stored procedure with the code:
                   if ( schemaDoc == null )
                        // Obtain default connection
                        Connection conn = new OracleDriver().defaultConnection();
                        OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement("SELECT XmlDocObj FROM XmlDoc WHERE XmlDocNbr = 2");
                        OracleResultSet rset = (OracleResultSet)stmt.executeQuery();
                        if ( rset.next() )
                             // get the XMLType
                             XMLType schemaXml = (XMLType)rset.getObject(1);
                             XSDBuilder builder = new XSDBuilder();
                             XMLSchema schemaDoc = (XMLSchema)builder.build(new InputSource(schemaXml.getInputStream()));
                   if ( inst == null )
                        inst = new ValidateCoreRequest();
                   ErrorHandlerImpl handler = inst.getNewErrorHandler();
    SAXParser saxParser = new SAXParser();
    saxParser.setXMLSchema(schemaDoc);
    saxParser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    saxParser.setErrorHandler(handler);
    saxParser.parse(new InputSource(new StringReader(docStr)));
    if( handler.validationError )
                        errorMsg[0] = handler.saxParseException.getMessage().substring(0, Math.min(199, handler.saxParseException.getMessage().length()));
    Never reports validation errors in the XML. Although the XDK Programmers Guide states "...you can use
    the oracle.xml.parser.schema.XSDBuilder class to build an XML schema and
    then configure the parser to use it by invoking the XMLParser.setXMLSchema()
    method. In this case, the XML parser automatically sets the validation mode to
    SCHEMA_STRICT_VALIDATION and ignores the schemaLocation and
    noNamespaceSchemaLocation attributes." No validation seems to occur. I have tried to set an xsi:noNamespaceSchemaLocation attribute on the root XML node, but this results in URL errors if the URL is not valid or schema build errors if the URL is valid, but does not point to a real location.
    It appears that without a schema location attribute, no schema validation occurs. Using setXMLSchema() with a database source does not seem to cause the schema location attributes to be ignored. At least for Java stored procedures.
    Does XML Schema validation work in the database for externally referenced schemas?
    Thank You,
    Art

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jan Vissers ([email protected]):
    I have two schemas A and B. A contains a java stored procedure which calls a java stored procedure stored in B. Upon resolving the "A" Java Stored Procedures I get the following error:
    ORA-29545: badly formed class: at offset 3093 of Adapter.TFADPBeschikbaarheid.sendAanvraag expecting a class-oracle.xml.parser.v2.XMLDocument but encountered a class-oracle.xml.parser.v2.XMLDocument.
    ... Question:
    it is expecting something which it has in fact encountered... SO!!!! What is the error.
    Thx,
    Jan<HR></BLOCKQUOTE>
    Try this:
    Edit your XSU installation script located on lib directory of Oracle XSU's distribution:
    Find the line:
    loadjava -r -v -u $USER_PASSWORD xmlparserv2.jar
    Replace by:
    loadjava -r -v -g public -u $USER_PASSWORD xmlparserv2.jar
    And installs your Oracle XSU again.
    Best regards, Marcelo.

  • Urgent - please help with osb-service bus schema validation.

    I have a proxyService runing on osb service bus, when I send wrong input to my proxyservices it react correctly by rejecting it, becuase the requestion is not conform to the schema, but I only get the error message saying that
    the Input is does not much, is there a way to get more info about the error ?
    like witch fields that cause the error ?

    The fault variable in your stage error handler will have the approariate information. Just add a stage error handler in the stage you are doing schema validation (make sure that in validate action you are selecting "raise Error on validation failure") and the error handler log the $fault
    Also refer -
    Re: Validate each xml element against XML schema
    Regards,
    Anuj

  • DTD/ schema validation and XSLT

    Hi
    I want to do mappings from IDoc to CIDX messages. The first choice was to do XSLT mappings. But because we need DTD/schema validation we switched to Graphical mapping.
    But mapping idocs to cidx messages with graphical mapping is proving to be a difficult job with all the context problems.
    Is it possible to combine the advantages of both mapping techniques in the following way.
    Define 1 interface mapping with 2 message mappings in it:
    - The first 'source to target' with XSLT.
    - The second 'target to target' with Graphical mapping (only connecting the top node) so we can have DTD/Schema validation.
    Kind regards
    Thierry

    hi,
    Source - XSLT - Target1
    Target1 - GM - Target2
    If what I understand is correct,in your INTERFACE MAPPING , then your Source Interafce will point to messagetype of typr SOURCE and Destination Interface will point to message type TARGET2.
    If yes, then like i told use SOURCE with XSLT to create TARGET1 , then use TARGET1 as the input to your next mapping program and create the TARGET2 as the output.
    In your message mapping,
    1 SOURCE   TARGET1  will act as the source and destination message types for one mapping (XSLT>)
    2. TARGET1 TARGET2 will act as the cource and destination mesage types for the other mapping (GRAPHICAL)
    Regards,
    Bhavesh

  • How to do schema validation with XSD_90200B Beta?

    Hi, I just downloaded xdk_java_9_0_2_0_0B.zip. And found that the size of xmlparserv2.jar and xschema.jar are significantly reduced. And if I replace them with the June version I had before, it does not do schema validation anymore.
    What other jar files do I need to do Schema Validation?
    Thank you very much!
    Yufei
    null

    The schema validation is in the xschema.jar.

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

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

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

  • Xml schema validation problem

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

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

Maybe you are looking for

  • Issue in calculating sum on a column at the end of the report in Pivot view

    Hi, I have some columns like Hierarchy column A, Non Hierarchical columns B, C and a measure D. In Pivot view under rows I have placed columns A,B and C in Columns and D in measures. If I try to calculate sum of values at the end of report by using o

  • Urgent !!! User exits or badi for purchase info records

    Hi all, In purchase info records that is through tcode ME11, ME12 I need to validate order unit field. When you go to tcode ME12 in the second screen you will find order unit field. Now the thing is I need to validate this field. For example when the

  • Display only works for 2 or 3 seconds after this is black on Qosmio G50

    Hi I have a problem with my G50. On starup the display only works for 2 or 3 seconds after this is black, I connect to a external display and using de FN+F5 i can see everything on the second display, if I turn to the internal display using FN+F5 it

  • Sql Server 2014 - Error message: Failed to read BLOB column

    Hi all,   Am experiencing this error in Microsoft SQL Server 2014 - 12.0.2000.8 (X64) Enterprise Edition (Build 7601: Service Pack 1). Error messages: Message: Failed to read BLOB column Stack:    at Microsoft.SqlServer.Replication.Snapshot.SqlServer

  • Jasper Reports problem

    Hi, I have just begun to use Jasper Reports, and I am trying to load a sample JR xml file into a jsp in my web application. report.jsp <%@ page    import="java.io.*,            java.util.*,            java.sql.Connection,            javax.sql.DataSou