Hi Castor
developers,
Please excuse my
question. I am new to Castor. and there is a very real chance that my
question is entirely stupid.
To set the scene, I
am looking at applying Castor for validation of web services under Apache SOAP,
and also to generalised forms (HTML, Swing) in the future.
If I have a datatype such as double, but
the corresponding XML element content is not a valid double value (eg "X") - that is the XML is invalid - then
Unmarshaller.unmarshall() throws a NumberFormatException from the line
"primitive = new Double(value);" in UnmarshalHandler.toPrimitiveObject().
Perhaps
naively, I would have expected such exceptions to be wrapped into a
MarshallingException. Is this reasonable?
I am guessing
that this is because the catch at the end of endElement() catches Exception and
not RuntimeException (or perhaps Throwable)?
On a more positive side, I plan to add code to
SourceFactory to optionally generate code for hashcode(), clone(), maybe toString(), and possibly a full-argument
constructor. I am happy to donate this code back to the project, if
you wish.
Regards & thanks
in advance
Dean
|
intelli WHERE www.intelliwhere.com |
|
Dr. Dean
Chalker Senior Architect [EMAIL PROTECTED] IntelliWhere Division, Intergraph Corporation Australia Phone: 61-7-3510 8918 Fax: 61-7-3510 8901 |
