Hi

Which is better:
1. Define a schema for a java bean, auto-generate the source code and
get the validation done by castor while populating the bean from a xml
instance.

2. Hand code the java bean. Define a mapping file. Populate the java
bean from a xml instance through castor. I don't think I need to
define a schema here (correct me, if I am wrong)

Advantage for 1) is validation of data types and values can be
performed by castor.
Advantages for 2) are flexibility to add application specific helper
methods to the bean, or when  you cannot touch the source for the
bean.

Obviously, advantage of one is the disadvantage for the other.

So, how can I get the best of both worlds? I want to hand code my bean
class (not use SourceCodegenerator). I want to define the schema apart
from the mapping so that castor can validate the xml instance against
the schema for both data types and some values.


TIA

~Sandeep

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to