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.

Similar Messages

  • Schema Validation with Java and Document object

    Hi, I am working on a project that will validate an xml Document object from a child class. I seem to have completed XSD validation with new DOMSource(doc) and using schema factory, which doesn't support DTD validation. And now I am attempting to validate the DTD. It seems like all the examples I've seen are trying to parse files, and I am struggling with finding a way to validate it directly against the document object.
    The child class creates the xml document which is passed back to the parent class, and I need to do the validation in the parent class, so I need away to validate against the document object. This will be an assertion in Fitnesse if anyone is familar with it.
    private void doSchemaValidationCommand(int rowCount, Document doc, String xpathExpression)
             String validationPath = getText(rowCount,1);
             String extensionSeparator = ".";
             Boolean error = false;
             String ext = null;
             try
             int dot = validationPath.lastIndexOf(extensionSeparator);
            ext = validationPath.substring(dot + 1);
             catch(Exception e)
                  this.wrong(rowCount, 1, e.getMessage());
             if (ext.equalsIgnoreCase("xsd"))
             try {
             SchemaFactory factory =
                SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
            File schemaLocation = new File(validationPath);
            Schema schema = factory.newSchema(schemaLocation);
            Validator validator = schema.newValidator();
            try {
                validator.validate(new DOMSource(doc));
            catch (SAXException ex) {
                this.wrong(rowCount, 1, ex.getMessage());
                error = true;
            catch (IOException ex)  {
                 this.wrong(rowCount, 1, ex.getMessage());
                 error = true;
           catch (SAXException ex) {
               this.wrong(rowCount, 1, ex.getMessage());
               error = true;
           catch (Exception ex){
                this.wrong(rowCount, 1, ex.getMessage());
                error = true;
             else if (ext.equalsIgnoreCase("dtd"))
                  try {
             }

    I tried this but it doesn't give me any validation of whether or not it was completed successfully, it just adds a tag for the dtd to the xml and doesn't seem to do anything further with it, am I missing any steps?
    else if (ext.equalsIgnoreCase("dtd"))
                  try {
                       DOMSource source = new DOMSource(doc);
                       StreamResult result = new StreamResult(System.out);
                       TransformerFactory tf = TransformerFactory.newInstance();
                       Transformer transformer = tf.newTransformer();
                       transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, validationPath);
                       transformer.transform(source, result);
                  catch(Exception e)
                       this.wrong(rowCount, 1, e.getMessage());
                       error = true;
             }Edited by: sarcasteak on Apr 13, 2009 1:33 PM

  • 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.

  • 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

  • Problem when attribute fails schema validation

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

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

  • HT204053 i want to change my icloud id on my iPhone, but it won't let me now that i have upgraded.  I no longer have the password and the problem is It is using an old id which the email isn't valid and the security question does not think my birthday is

    I want to change my icloud id on my iPhone, but it won't let me now that i have upgraded.  I no longer have the password and the problem is It is using an old id which the email isn't valid and the security question does not think my birthday is valid.  I cannnot delete the account because "find my iphone" wants the password linked to this old account.  But when i go into the find my iphone app it is using my corect Apple ID.  How do i fix this?

    If you still have access to your old email address, go to https//appleid.apple.com, click Manage my Apple ID and sign in with your iCloud ID.  Tap edit next to the primary email account, tap Edit, change it back to your old email account and verify it.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iPhone on your device. Then go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https//appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  You can now go to Settings>iCloud and sign in with your correct iCloud ID and password.
    If you don't have access to your old email address, you will have to contact Apple to have them reset the password so you can disable Find My iPhone and sign into your iCloud account.  You can either go to https://expresslane.apple.com, select "More Products and Services", then "Apple ID", then  on the next page select "Other Apple ID Topics", then "Lost or forgotten Apple ID password" and click "Continue"; or you can contact Apple Support (http://www.apple.com/support/icloud/contact/).

  • XML DevCon 2001: Submit schema and stylesheet problems- win XML Spy

    There are only a few days to submit schema and stylesheet problems for XML
    DevCon 2001 in London. If the workshop instructors use your submission
    during the conference, you win a copy of XML Spy.
    <shamelessPlug>
    XML DevCon 2001 has a content-rich technical program with a faculty that
    includes Henry Thompson (W3C Fellow), Peter Chen (IEEE Fellow, ACM
    Fellow),
    Martin Bryan (DIFFUSE Project), and authors such as Bob DuCharme, Ian
    Graham, Elliotte Rusty Harold, G. Ken Holman, Benoît Marchal, JP
    Morgenthal,
    and Simon St. Laurent. There are a variety of eBusiness sessions,
    including
    panel discussions and presentations about ebXML, Web Services, and UDDI.
    The program includes presentations by Jonathan Borden, Ron Bourret, Lee
    Buck, Alex Chaffee, Mark Colan, John Evdemon, Meike Klettke, Andy
    Longshaw,
    Ingo Macherius, Simon Nicholson, David Orchard, Sebastian Rahtz, Daniel
    Rivers-Moore, Michael Rys, Krishna Sankar, Matt Sergeant, Richard Tobin,
    Priscilla Walmsley, David RR Webber and other distinguished faculty.
    </shamelessPlug>
    http://www.xmldevcon2001.com/London/html/conference.php
    For a free pass to exhibits and special events (keynotes, joint XML UK and
    British Computer Society meeting, OASIS XPath/XSLT meeting, vendor
    presentations):
    http://www.xmldevcon2001.com/London/html/special_events.php
    Public submissions (schemas and stylesheets)
    Three members of the W3C Schema Working Group (Michael Rys, Henry
    Thompson, Priscilla Walmsley) will teach a Schema Workshop. Submit
    problem schemas to them by e-mail:
    [email protected]
    or
    http://www.xmldevcon2001.com/London/html/session.php?code=W5
    Sebastian Rahtz, Bob DuCharme, Benoît Marchal, and Ken Holman will
    present the "Stylesheets and Transformations: Best Practices" workshop on
    Thursday, February 22 in London. To submit a stylesheet or problem
    description for their workshop:
    [email protected]
    or browse to:
    http://www.xmldevcon2001.com/London/html/session.php?code=T17
    ========== Ken North ======================
    See you at Javacon 2001 (New York, March 1)
    www.javacon2001.com
    XML DevCon 2001: London (February 21-23) New York (April 8-11)
    www.xmldevcon2001.com
    =======================================

    Looks okay to me. But then I have no idea of what those "problems" are that you mentioned. Was there a particular reason you didn't tell us what they are?

  • 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

  • BPM Problem: Schema validation error notification

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

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

  • Problem in SAX XSD schema validator

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

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

  • ICSS_B2C Customer relogin problem "Enter a valid user id and password".

    Hi Gurus,
    In ICSS_B2C, I have login problem with the userid and password that i have created. I have maintained all necessary settings in XCM, reference user etc.,
    I have configured icss_b2c Admin with value "CRM_SU01UserID" for component usertype in http: //server:port/icss_b2c/admin/xcm/init.do.
    UserID is getting saved but when i try to relogin with the same, I am getting the message ""Enter a valid user id and password".
    I tried with alias, su01i
    Guide me Where all I can check to solve this?
    Thanks and points will be rewarded.
    urgent
    Srinivas.

    Hi
    The User Id that you have created, must have been assigned to a BP in the tcode BP and role BUP005.
    Goto the BP and check the Internet User tab
    The user name that you are suppose to use is the one mentioned in the Internet User field in the Logon data dataset.
    Hope this helps
    Regards
    Rekha Dadwal

  • [Cisco FAQ] - How can I find the "HOST ID" "VALIDATION KEY" and LICENSES I currently have?

    Please let me know where I can get this information

    The HOST ID is actually the serial number of the chassis minus all the preceeding zeros. To find Host ID, Validation Key and Current licenses, go to the SYSTEM TAB, LICENCE MANAGEMENT - all are displayed on this page.

  • Validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result

    HI All,
    I have a situation.
    I need to validate the input file against a given schema inside an orchestration and producing 2 different files based on the validation result.
    A predefined success schema in case of  validation success and negative schema structure for validation failure.
    any advice ?

    Hi Rachit,I following the blog
    http://dietergobeyn.be/validating-biztalk-messages-orchestration/ and stuck in few things
    I created a helper class with the name Validation and following code
    [Serializable]
        public class Validation
            private bool _isValid = true;
            public bool Validate(XmlDocument document, Type schema)
                XmlSchemaSet set = new XmlSchemaSet();
                if (typeof(SchemaBase).IsAssignableFrom(schema) && !schema.IsNested)
                    set.Add((Activator.CreateInstance(schema) as SchemaBase).Schema);
                ValidationEventHandler eventHandler = new ValidationEventHandler(HandleValidationError);
                document.Schemas = set;
                document.Validate(eventHandler);
                return _isValid;
            private void HandleValidationError(object sender, ValidationEventArgs ve)
                _isValid = false;
    public static bool ValidateMessage(XLANGMessage msg)
    XmlDocument xDoc = new XmlDocument();
    xDoc = (System.Xml.XmlDocument)msg[0].RetrieveAs(xDoc.GetType());
    Type t = typeof(Schemas.External.Invoice_v3_1);
    Validation validation = new Validation();
    return validation.Validate(xDoc, t);
    First thing, Do i need to write the ValidateMessage method inside the helper class or not ??
    If inside, how to add the reference of schema files in the statement (Type t = typeof(Schemas.External.Invoice_v3_1);)
     I tried adding the reference of my schema project but it is showing error.
    And what is to be written in the ValidateMessage expression shape in Orchestration ?
    Really appreciate your help.

  • 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

  • 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();

Maybe you are looking for

  • My older username is not working...had to create a...

    how can i ge into my old account its saying is not found but whden i look i up under my new profile i found it...I would like to use my older username i have all my conacts under that profile...How can i get into that profile

  • Where can I get Indesign CS5?

    Hi my employer has CS5 installed on their PC's - which they bought online.  I now need to instal it on a laptop so that I can work off site and as they have no discs I can't do it easily.  Where do I get a copy of CS5 from?  Upgarding all of them to

  • I need help with some questions

    I seen where it said if something happens to your computer that you will loose the music you bought and downloaded . Will you also loose the information about your itunes gift card ?How do you run a diagnostic before you buy ? Is there a phone number

  • Characteristic error:BAPI_ACC_DOCUMNET_POST to post entries in FB50

    Hi, I am using BAPI_ACC_DOCUMNET_POST to post entries in FB50 for COPA and Non COPA .Initially I was getting some errors and I changed the object type from BKPFF TO fkksu.The errors changed and I got error for Curr type .Then I filled the Curr type a

  • Can't register Adobe Design Premium 5.5 on new Mac laptop.

    I just installed Adobe Design Premium 5.5 on my new laptop (zeroed out the old laptop HD). Upon launch, the apps request a 6 digit serial #. However, Design Premium 5.5 DVDs shipped with a 24-digit serial number. I registered the sw with Adobe in May