Instead of parsing the schema with DOM/SAX, just loading it with URL worked 
with JBoss.
But I don’t know how and why?
here is the sample code:



URL schemaURL = 
Thread.currentThread().getContextClassLoader().getResource(WSConstants.BOOKING_SCHEMA_FILE);
SchemaFactory provBookingSchemaFactory = 
schemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); 
provBookingSchemaFactory.setErrorHandler(new InvalidXMLErrorHandler());
Schema provBookingSchema = provBookingSchemaFactory.newSchema(schemaURL);
Validator provBookingValidator = provBookingSchema.newValidator();
provBookingValidator.validate(new DOMSource(requestDoc));

Earlier I was creating the schema instance using the DOM source:-


Schema provBookingSchema = provBookingSchemaFactory.newSchema(new 
DOMSource(schemaDoc));

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4211697#4211697

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4211697

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to