Hi everyone -
I'm trying to use Castor XML Code generator 1.3.2 in my project. I'm
invoking it through the Maven 2 plugin.
I'm having the following error:
*cannot find symbol
symbol : method setPattern(java.lang.String)
location: class org.exolab.castor.xml.validators.StringValidator*
This method is actually called in one of the classes generated from my XSD.
Here's the context:
*//-- validation code for: _naissance
fieldValidator = new org.exolab.castor.xml.FieldValidator();
{ //-- local scope
StringValidator typeValidator = new StringValidator();
typeValidator.setWhiteSpace("preserve");
typeValidator.setPattern("\\d{4}-\\d{2}-\\d{2}");
fieldValidator.setValidator(typeValidator);
}
desc.setValidator(fieldValidator);*
It seems that the setPattern method of the PatternValidator class has been
deprecated some versions ago and no longer exists in the 1.3.2 version.
So, if I'm not missing something, although the method no longer exists in
the Castor XML 1.3.2 API it appears in code generated by this very API.
Please let me know if there is something I'm missing or, if not, is there is
a workaround to this problem.
Thanks for taking the time to help me figure this out!
-Anca