Han
can you validate the googlesearch.wsdl with this approach ?
Marcos Alois Oliva "355/113 -- PI or not PI ? " In the beginning, there was nothing, and God said, "Let there be light!" And there was still nothing, but now you could see it. - "The beginning of knowledge is the discovery of something we do not understand." - Frank Herbert (1920-1986) "The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance." - Confucius (551-479 BC)
From: "Han Weyn" <[EMAIL PROTECTED]> Reply-To: <[email protected]> To: <[email protected]> Subject: Re: [castor-user] Validation not working Date: Fri, 28 Jan 2005 09:01:47 +0100
tnx,
for people with the same problem these are the propeties I had to add:
LocalConfiguration.getInstance().getProperties().setProperty("org.exolab.castor.parser.validation", "true");
LocalConfiguration.getInstance().getProperties().setProperty("org.exolab.castor.parser.namespaces", "true");
LocalConfiguration.getInstance().getProperties().setProperty("org.exolab.castor.sax.features", "http://apache.org/xml/features/validation/schema");
or u can put them in the castor.properties file
han -----Original Message----- From: Keith Visco [mailto:[EMAIL PROTECTED] Sent: Thu 1/27/2005 9:17 AM To: [email protected] Subject: Re: [castor-user] Validation not working
The validation flag is for object model validation not XML schema validation, works good when you've used Castor generated source.
For your own object model + mapping file, then you'll need to enable the parser validation in the castor.properties file if you want the parser to validate using your xml schema.
--Keith
Han Weyn wrote: > Hi, > > I'm trying to validate an XML with a schema in Castor but although the > XML is not valid(I checked that in an XML editor on the same machine), > no ValidationException gets thrown. > > 1) is it possible to validate an XML with an XSD schema in Castor(using > a mapping based unmarshaller)? > > 2) what am I doing wrong? > > XML: > ==== > <?xml version="1.0"?> > <klantsystemen xmlns="http://schemaserver/schemas/1.0/" > xmlns:cs="http://schemaserver/schemas/1.0/" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > schemaVersion="1.0" xsi:schemaLocation="http://schemaserver/schemas/1.0/ > http://schemaserver/schemas/1.0/schema.xsd"> > <control_area> > ... > </control_area> > </klantsystemen> > > Java: > ===== > I'm using an unmarshaller with a Mapping and I've set the validation > flag to true > > > Tnx > > Han Weyn > Software engineer > > > > ------------------------------------------------------------------------ > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-user
<< winmail.dat >> ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
