You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by VF <vf...@imh.cz> on 2007/01/12 15:55:06 UTC

parsing xml dates

Hi all,

I have this problem with Axis2 and ADB. My wsdl schema defines some dates
elements:

 

...

<xs:element name="datefrom" type="xs:date"/>

<xs:element name="dateto" type="xs:date"/>

..

 

 

It seems,there must be smth wrong in parsing dates in Axis2. when I send 

 

<datefrom>2004-07-27</datefrom>

<dateto>2007-07-27</dateto>

 

I get

 

27.7.2004 

27.7.2007 

 

so it s correct.

 

Some other examples and these are interesting:

 

 

1.

 

<datefrom>2004-07-270</datefrom>

 

is after parsing

 

2004-07-27(seems it always takes first 10 symbols and tries to parse it)

 

2.

 

<datefrom>2004-07-207</datefrom>

 

is after parsing

 

2004-07-20

 

3.(example with wrong date)

 

<datefrom>2004-07-41</datefrom>

 

is after parsing

 

10.8.2004  (seems like it counts it in this way -> 41 - 31(max day date in
July) = 10 (.8.2004)

 

 

So I think, it should get some error and not to parse in this date or can I
make with it smth else? 

 

   Thanks  Vladi