[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: [jira] [Updated] (XMLBEANS-470) Schema validation not working in
From: "Priyanka (Updated) (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date: 2011-10-17 15:48:11
Message-ID: 175663458.761.1318866491349.JavaMail.tomcat () hel ! zones ! apache ! org
[Download RAW message or body]
[ 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-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic