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

Similar Messages

  • Dynamic schema validation and validation error consolidation

    I have a case where there are 18 schemas against which I need to validate my payload. After validation if there is any errors in that then I want a list of elements where it got failed. I want to know is that possible in BPEL?

    Hi there,
    Couldn't get what exactly your requirement is for.
    But I believe your requirement is some where in line with this post:
    https://forums.oracle.com/thread/423576
    Hope using the choice element and creating a unique xsd will suffice your requirement.
    Regards,
    Deepak.

  • Regarding schema validation and dbms_xmlparser, dbms_xmldom

    Hi All,
    Recently I came across one scenario, where I need to register XSD and validate all incoming xml agaist registered XSD and then access its contents and process them as per business needs.
    To accomplish this:
    1. Simply I have registered XSD using registerschema+ .
    2. To validate xmls, used schemaValidate+ .
    3. Once this is done then to fetch value from xml, I used below statement:
    SELECT EXTRACTVALUE (COLUMN_VALUE, '/details/emp_id') "Employee_ID"
    FROM TABLE
    +(XMLSEQUENCE+
    +(XMLTYPE+
    +('<?xml version="1.0"?>+
    +<employee>+
    +<details>+
    +<emp_id>1001</emp_id>+
    +</details>+
    +</employee>'+
    +).EXTRACT ('/employee/details')+
    +)+
    +) t;+
    This works fine.
    But I was browsing the same requirement over forum, got solutions related to DBMS_XMLPARSER and DBMS_XMLDOM.
    I tried to go through its details but didnt get much idea on the same.
    Can anyone please help me to understand about use of dbms_xmlparser and dbms_xmldom and about DOM.
    In which scenario we need to use them?
    Thanks
    Vikram

    Where I was thinking with that sentence is the "streaming evaluation" that Oracle now offers. This option is available when XML is stored in an XMLType column of SECUREFILE BINARY format (introduced in 11.1.0.6 and default for XMLType columns in 11.2.0.2) and that data is queried/accessed.
    You can find some information on it here
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb01int.htm
    (Search for "streaming")
    and here as well
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28369/xdb_xquery.htm#CBAIIEFG
    Streaming is basically reading the data as Oracle scans past it since it knows, based on the binary storage format, what the XML looks like, so it does not need to create the whole document to find the sections the XPath/XQuery specifies. You can see that a SQL statement is using streaming evaluation when "XPATH EVALUATION" shows up in the explain plan as shown by
    {message:id=10737315}
    This option is only available when the XML is stored in the DB in the correct format. If the XML is stored in a PL/SQL variable, Oracle cannot use streaming evaluation on it.

  • Schema Validation Key/Keyref and substitutionGroup Problem

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

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

  • Problem with Struts Validation and apache dtd definition.

    Jakarta Struts
    Java Version 1.5
    We have one web application that is being a little problematic, on startup two errors are thrown relating to the same problem (errors below).
    We get 401 returned for http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
    both the validation.xml and validation-rules.xml have the same doc type set as below:
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    We have the same configuration set for several other web application deployed succesfuly on the same tomcat application server without any problems. I'm not sure why this one application is causing a problem, I don't see any difference between the validation.xml and validation-rules.xml files in this application to any of the others that have been succesfully deployed, infact the validation-rules.xml is identical for all the web applications hosted on this server.
    Any ideas appreciated
    Error
    2006-03-30 15:04:50,968 ERROR [HttpRequestHandler-169] validator.ValidatorPlugIn (ValidatorPlugIn.java:224) - Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
    java.io.IOException: Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)
         at java.net.URL.openStream(URL.java)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2292)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:265)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:540)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:465)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:298)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:277)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:184)
         at org.apache.commons.digester.Digester.parse(Digester.java:1515)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(Unknown Source)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:222)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:161)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
         at javax.servlet.GenericServlet.init(GenericServlet.java:259)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2141)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4582)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4676)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:820)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:542)
         at com.evermind.server.Application.getHttpApplication(Application.java:889)
         at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:690)
         at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:420)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:422)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    2006-03-30 15:04:50,968 INFO [HttpRequestHandler-169] validator.ValidatorPlugIn (ValidatorPlugIn.java:209) - Loading validation rules file from '/WEB-INF/validation.xml'
    2006-03-30 15:04:50,984 ERROR [HttpRequestHandler-169] validator.ValidatorPlugIn (ValidatorPlugIn.java:224) - Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
    java.io.IOException: Server returned HTTP response code: 401 for URL: http://jakarta.apache.org/commons/dtds/validator_1_0.dtd
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)
         at java.net.URL.openStream(URL.java)
         at oracle.xml.parser.v2.XMLReader.openURL(XMLReader.java:2292)
         at oracle.xml.parser.v2.XMLReader.pushXMLReader(XMLReader.java:265)
         at oracle.xml.parser.v2.NonValidatingParser.pushExternalDTD(NonValidatingParser.java:540)
         at oracle.xml.parser.v2.NonValidatingParser.parseDoctypeDecl(NonValidatingParser.java:465)
         at oracle.xml.parser.v2.NonValidatingParser.parseProlog(NonValidatingParser.java:298)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:277)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:184)
         at org.apache.commons.digester.Digester.parse(Digester.java:1515)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(Unknown Source)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:222)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:161)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
         at javax.servlet.GenericServlet.init(GenericServlet.java:259)
         at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2141)
         at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4582)
         at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4676)
         at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:820)
         at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:542)
         at com.evermind.server.Application.getHttpApplication(Application.java:889)
         at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:690)
         at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:420)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:422)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    -----------------------------------------------------------------------

    hi,
    I am also facing the same issue. Could you tell me which are those jar files you were missing & from where you got those?
    regards
    prasanth

  • Memory Leakage while parsing and schema validation

    It seems there is some kind of memory leakage. I was using xdk 9.2.0.2.0. Later i found that from this forum which contain a Topic on this and they (oracle ) claim they have memory leakage. And they have fixes this bugs in 9.2.0.6.0 xdk. When i used truss command, for each call to parser and schame validation, it was opening file descriptor for lpxus and lsxus file. And this connections were not close. And keep on openning it with each call to parser. I was able to diagonise this using truss command on on solaris. After making many calls, i was error message could not open file Result.xsd (0202). I am using one instance of Parser and Schema. And i am doing clean up for parser after each parse.
    Later i downloaded, 9.2.0.6.0,
    Above problem for the parser was solvedm but still the problem continued for schema validation. And even i tried with latest beta release 10.
    And this has caused great troubles to us. Please can u look whether there is come sort of leakage. Please advice if u have any solution.
    Code---
    This below code is called multiple times
    char* APIParser::execute(const char* xmlInput) {
              char* parseResult = parseDocument(xmlInput);
              //if(strcmp(parseResult,(const char*)"")==0) {
    if(parseResult == NULL) {
                   parseResult = getResult();
    parser.xmlclean();
         return parseResult;
              } else {
                   return parseResult;
    Parser and schema are intialised in Construtor and terminated in Destructor.

    Hi, here is the complete test case
    #include<iostream>
    #ifndef ORAXML_CPP_ORACLE
    # include <oraxml.hpp>
    #endif
    using namespace std;
    #define FAIL { cout << "Failed!\n"; return ; }
    void mytest(int count)
         uword ecode;
         XMLParser parser;
         Document *doc;
         Element root, elem;
         if (ecode = parser.xmlinit())
              cout << "Failed to initialze XML parser, error " << ecode << "\n";
              return ;
         cout << "\nCreating new document...\n";
         if (!(doc = parser.createDocument((oratext *) 0, (oratext *) 0,(DocumentType *) 0)))
         FAIL
         if (!(elem = doc->createElement((oratext *) "ROOT")))
                   FAIL
         string test="Elem";
         for(int i=0;i<count;i++)
              //test="Elem"+string(ltoa(i));
              if (!(elem = doc->createElement((oratext *) "element")))
                   FAIL
              if (!doc->appendChild(elem))
                   FAIL
         //doc ->print();
         //parser.xmlclean();
         parser.xmlterm();
    int main(int argc,char* argv[])
         int count=atol(argv[1]);
         mytest(count);
         char c;
         cout<<"check memory usage n press any key"<<endl;
         cin>>c;
         return 0;
    -------------------------------------------cut here-----
    Now, i cant use the xdk 10g because i work on a hpux machine. I have tried the above program with a count of 1000000. the memory usage at the end was around 2 gigabytes.
    Could someone please please help me? :(
    Thank you.

  • 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

  • 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

  • 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

  • How to populate XML schema details in XSLT output

    I want to print details about XML schema , xmlns on XSLT output as below.
    <?xml version="1.0" encoding="UTF-8"?>
    <CBISEDACReqLogMsg xsi:schemaLocation="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04 CBISEDACReqLogMsg.00.01.04.xsd"
    xmlns="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    But in actual
    In my XSLT output I can see below.
      <?xml version="1.0" encoding="UTF-8" ?>
    - <CBISEDACReqLogMsg xmlns="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04">
    My XSLT is as code is below
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0"
    xmlns:calendar="http://www.oracle.com/XSL/Transform/java/java.util.Calendar"
    xsl:schemaLocation="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04 CBISEDACReqLogMsg.00.01.04.xsd"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="urn:CBI:xsd:CBISEDACReqLogMsg.00.01.04"
    xmlns:string="http://www.oracle.com/XSL/Transform/java/java.lang.String"
    exclude-result-prefixes="calendar string">
      <xsl:output method="xml" indent="yes" encoding="UTF-8"></xsl:output>
      <xsl:template match="/">
    Kindly help me for how to show other required details in XSLT output.

    I am in the same boat. How do I disable XML Validation in NW BPM?
    In my case, Data comes from PI to NW BPM. But PI never cares about schema validation unless asked for. I have at least a 100 WSDLs that are failing to receive messages if I could not turn this off in BPM. I can not fix the Data Type as it is supported by third party.
    Any help is appreciated.
    VJ

  • 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

Maybe you are looking for