[ https://issues.apache.org/jira/browse/XMLBEANS-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Priyanka updated XMLBEANS-470: ------------------------------ Attachment: (was: invali.xml) > Schema validation not working in the java code for href tags > ------------------------------------------------------------ > > Key: XMLBEANS-470 > URL: https://issues.apache.org/jira/browse/XMLBEANS-470 > Project: XMLBeans > Issue Type: Bug > Reporter: Priyanka > Priority: Critical > > Hi, > We have just upgraded to xmlbeans 2.5.0 and after that schema validation for > href tag has stoppred working. > We've tried validating it using direct validate command prompt and then it > works fine. But through java code, it says it is schema valid even though > that is not the case. > Attached is the jar we are using and the sample invalid xml. > below is the java code to validate the message. > protected boolean validateDocument(final Message doc) throws > ValidationException { > boolean valid = false; > final List validationErrors = new ArrayList(); > final XmlOptions validationOptions = new XmlOptions(); > validationOptions.setErrorListener(validationErrors); > if (!doc.validate(validationOptions)) { > final Iterator iter = validationErrors.iterator(); > final StringBuffer details = new StringBuffer(); > while (iter.hasNext()) { > details.append(iter.next() + "\n"); > } > final String errorMsg = "Generated document failed > schema validation! \n"; > EBlotterLog.STPLOG.debug("Message Schema Validation > failed errors are::" + errorMsg + details); > throw new ValidationException(errorMsg + details); > } else { > valid = true; > } > return valid; > } > Please note this was working fine till 2.3.0. When upgraded to 2.5.0, we have > removed xmlbeans-qname jar as project is running on jdk 1.6 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@xmlbeans.apache.org For additional commands, e-mail: dev-h...@xmlbeans.apache.org