Hi there,
I am trying to use GeneralizedFieldHandler for date field as shown in,
http://castor.exolab.org/xml-fieldhandlers.html
I am generating the source code from schema using SourceGen tool. And using the binding file as shown below,
<?xml version="1.0"?>
<cbf:binding
xmlns:cbf="http://www.castor.org/SourceGenerator/Binding"
defaultBindingType='element'>
<cbf:elementBinding
name="order">
<cbf:java-class name="Order"/>
<cbf:elementBinding
name="date">
<cbf:member name="date"
handler="org.openuri.order.OGeneralizedDateHandler"/>
</cbf:elementBinding>
</cbf:elementBinding>
</cbf:binding>
I am getting the following error, during marshalling the Order object to xml,
java.lang.IllegalStateException: A call to #setFieldHandler (with a
non-null val
ue)
must be made before calling this method.
at
org.exolab.castor.mapping.GeneralizedFieldHandler.getValue(Generalize
dFieldHandler.java:152)
at
org.exolab.castor.xml.FieldValidator.validate(FieldValidator.java:199
)
at
org.exolab.castor.xml.util.XMLClassDescriptorImpl.validate(XMLClassDe
scriptorImpl.java:876)
at
org.exolab.castor.xml.Validator.validate(Validator.java:122)
at
org.exolab.castor.xml.Marshaller.validate(Marshaller.java:2289)
at
org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:805)
at OCreator.main(OCreator.java:31)
Any clues please?
Thanks and Regards,
Jitesh
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
