Hi Huub,

that should work out of the box, as far as I can tell. Can I suggest that you create a new Jira issue and attach a (minimal, but fully working) test case to it ?

Regards
Werner

On 04.04.2010 23:37, [email protected] wrote:
Hello,

I'm trying to unmarshall a datetime field. The datetime field however can 
contain a value that is actually invalid according to Castor validation.
Therefore I want to implement a handler which will rewrite the invalid datetime 
to a valid value.


Suppose the following xsd:



  <xs:element name="Root">

   <xs:complexType>
    <xs:sequence>
     <xs:element name="CreationDateAndTime" type="xs:dateTime"/>
    </xs:sequence>
   </xs:complexType>
  </xs:element>



Configure a handler in binding.xml:

  <elementBinding name="/Root/CreationDateAndTime">
   <member name="CreationDateAndTime" handler="MyDateHandler"/>
  </elementBinding>


And try to unmarshall an xml document like:

<Root ....>
    <CreationDateAndTime>2010-03-1T09:57:01+01:00</CreationDateAndTime>
</Root>

The handler is never called as an exception is thrown.

Question:
How can I get a date like '2010-03-1T09:57:01+01:00' into a date field?

Greetings,
Huub


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

   http://xircles.codehaus.org/manage_email


Reply via email to