You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ley, Selena (GMI/CPR Dev.)" <SL...@exchange.ml.com> on 2003/08/11 21:05:34 UTC

Date Deserialization Error

Hi.
I'm using the latest Axis 1.1 (nightly build for 8/10/2003). I see a lot of the previous bugs from beta 2 version, which is great! many thanks!

My xml schema has the following element defined : 
<xs:element name="DateOfBirth" type="DateOfBirth" /> 
<xs:simpleType name="DateOfBirth"> 
<xs:restriction base="xs:date" /> 
</xs:simpleType>

I am able to create use the wsdl2java to create the java beans. However, when I'm testing with a sample message with the following snippet
	<COPER_ENTITY:DateOfBirth>1975-08-06</COPER_ENTITY:DateOfBirth> 

.. I receive the following error:

 -------------------------------------
Reading Msg from Individual.xml
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "1975-08
-06"
        at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDe
serializer.java:222)
        at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl
.java:537)
        at org.apache.axis.encoding.DeserializationContextImpl.endElement(Deseri
alizationContextImpl.java:1083)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:204)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:845)
        at org.apache.axis.message.MessageElement.getValueAsType(MessageElement.
java:698)
        at org.apache.axis.message.MessageElement.getValueAsType(MessageElement.
java:678)
        at com.ml.edsi.mif.tools.XmlToBeanDeserializer.deserializeXML(XMLToBeanD
eserializer.java:79)
        at BeanDeserializerTester.main(BeanDeserializerTester.java:45)
MIFException: java.text.ParseException: Unparseable date: "1975-08-06"

I checked the DateDeserializer and the simpledateformat used to parse the date is correct for this date. 
thx.
--Selena