hello,
i'm new to castor and have some questions about the way validation
works in the
objects that it generates. the prevailing version of castor here is
0.9.5. if
anyone has a constructive answer, even if it's "click this link and
start
reading," i would be grateful.
i'm hoping that my question here is general enough that i don't have to
post
code. here is the problem: i have a schema which defines a complex
type,
HotDog, to have several child elements. by default, the child elements
have
the restriction "minOccurs = 1". i have a test program which uses the
default
constructor to create a HotDog instance, and then i validate it, viz:
HotDog h = new HotDog();
h.validate();
since i have not set any of the data members of this object, the call to
h.validate()
correctly throws an exception. the problem i'm having is that the
validation
code seems to be somewhat simplistic. the only way i know what went
wrong is
to view the message in the ValidationException object. what i want is
to be
able to determine programmatically the cause of the validation error.
how can
i inspect this object to determine, for example, that it didn't
validate
because the _condiment field is null but is required to be set to
something
since minOccurs is 1?
thanks again for any help!
sincerely,
doug tomm
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev