Java Mailing List Archive

Home » user.castor »

[castor-user] [castor-codegen] java.util.Date in custom binding

Bartosz Michalik


Author LoginPost Reply
Dear all,
I am having an issue with castor configuration.
In my use case scenario Java classes are generated from schemas.
I am trying to introduce a custom binding from xs:string field to

Example of a schema:

 <xs:complexType name="Element">
    <xs:attribute name="type" type="xs:string" use="required"/>
    <xs:attribute name="date" type="xs:string" use="optional"/>  

Our binding file

<binding xmlns=""

 <complexTypeBinding name="Element">
   <java-class name="NewElementName" />
   <attributeBinding name="date" >
     <member java-type="java.util.Date"
handler="our.customized.Handler" />

Unfortunatelly, in a generated code the 'date' filed is of type
I have observed this behaviour using castor 1.0.5 (due to legacy reasons we
use this version) as well as with castor 1.3.

Any ideas/suggestins how to approach this problem ? For any other type than
j.u.Date it works as expected.
Best regards,

Bartosz Michalik

Attachment: smime.p7s (zipped)
©2008 - Jax Systems, LLC, U.S.A.