axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pétur Runólfsson <>
Subject [Axis2] Bring back hours, minutes, seconds when Date is formatted in SimpleTypeMapper
Date Thu, 11 Jun 2009 14:32:31 GMT

It seems that the schema type for java.util.Date has changed from xs:dateTime to xs:date in
Axis2 1.5. This is preventing me from upgrading, since the application depends on having both
the date and time available for many operations.

The attached patch adds a configuration option to change the schema type back to xs:dateTime.
When the service parameter JavaDateSchemaType is set to xs:dateTime, the format used by SimpleTypeMapper
is yyyy-MM-dd'T'HH:mm:ss.SSSZ, otherwise it is yyyy-MM-dd like before. Note that the format
is different from Axis2 1.4.1 because of the TimeZone parameter that was added in 1.5. Setting
the TimeZone to GMT restores the old behavior completely.

This patch only modifies the formatting in SimpleTypeMapper. Java2WSDL still treats Date as
xs:date. This doesn't matter for me, since the schema is easy to fix using a custom SchemaGenerator
or by running the wsdl through sed. Still, it doesn't seem hard to add the corresponding support
to Java2WSDL.

This fixes issues AXIS2-4329 and AXIS2-4370.


Pétur Runólfsson

The content of this e-mail, together with any of its attachments, is for the exclusive and
confidential use of the named addressee(s) and it may contain legally privileged and confidential
information and/or copyrighted material. Any other distribution, use or reproduction without
the sender's prior consent is unauthorized and strictly prohibited. If you have by coincidence,
mistake or without specific authorization received this e-mail in error, please notify the
sender by e-mail immediately, uphold strict confidentiality and neither read, copy, transfer,
disseminate, disclose nor otherwise make use of its content in any way and delete the material
from your computer.

The content of the e-mail and its attachments is the liability of the individual sender, if
it does not relate to the affairs of Betware.
Betware does not assume any civil or criminal liability should the e-mail or it´s attachments
be virus infected.

View raw message