HI Keith,
Thank you very much for your prompt replies.
As per my previous mails you might have got that I have tried using both basic
FieldHandler and
GeneralizedFieldHandler.
Please confirm whether
GeneralizedFieldHandler supported in the binding file?
Otherwsie basic FieldHandler is working fine except
generation of xsi:type for date element using binding file.
Thanks and Regards,
Jitesh
----- Original Message -----
From: "Keith Visco" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, January 27, 2005 5:27
PM
Subject: Re: [castor-user] GeneralizedFieldHandler
for date
> Hi Jitesh,
>
> I'm not sure if Arnaud ever added support for generalized handlers in
> the binding file. I'll have to double check that.
>
> --Keith
>
> Kalyani Jitesh wrote:
>> 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
>
>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
