axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amila Suriarachchi <amilasuriarach...@gmail.com>
Subject Re: [Axis2] Bring back hours, minutes, seconds when Date is formatted in SimpleTypeMapper
Date Fri, 12 Jun 2009 05:30:34 GMT
On Thu, Jun 11, 2009 at 8:02 PM, Pétur Runólfsson <petur@betware.com> wrote:

> Hi,
>
> 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.


Now the convention is to map java.util.Date to xs:date and
java.util.Calendar to xs:datetime
is it possible you to convert your app to use Calendar instead of date where
you need to have datetime.
here the reason is that if you represent something like birthday which
represent in java as java.util.date and should map to a xs:date.

thanks,
Amila.


>
>
> 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.
>
> Regards,
>
> Pétur Runólfsson
> Betware
>
> 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.
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Mime
View raw message