Title: RE: How can I get a Date object from a xsd:dateTime

Hi, just posting the solution to my problem. It was very simple, but as someone pointed out, the documentation for the mapping was a little confusing (the wsdd reference says classname instead of type or languageSpecificType).

This is how you replace the standard mapping for Date:

  <typeMapping  type="java:java.util.Date"
    qname="xsd:dateTime"
    serializer="org.apache.axis.encoding.ser.CalendarSerializerFactory"
    deserializer="org.apache.axis.encoding.ser.CalendarDeserializerFactory"
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>

In this special case, the Calendar serializers work with Date instances if the java class specified in the mapping is Date, so I'm taking advantage of that, and not to writing a new deserializer (although this is not part of the documented class contract I'm taking my chances with it).

I'm writing now a doc on how to migrate from Apache SOAP, and this will be included.


-----Original Message-----
From: FONTDEVILA Diego [mailto:[EMAIL PROTECTED]]
Sent: Mi�rcoles 21 de Enero de 2004 10:54
To: '[EMAIL PROTECTED] Apache. Org' (E-mail)
Subject: How can I get a Date object from a xsd:dateTime


I'm migrating a service that used Apache SOAP. I need to get Date instances for my service to work. The standard Axis mapping is xsd:dateTime -> Calendar.

Is there any way I can change the default mapping? (it yields Calendar objects)
I have been trying to add a new type mapping to my wsdd for the last day but it doesn't seem to work. Otherwise, I'll have to add code to my service's entry point.

Thanks in advance,
Diego Fontdevila
Canales Alternativos - Desarrollo de Sistemas
Banco Soci�t� G�n�rale
[EMAIL PROTECTED]
4324-8795



http://www.portalsociete.com
Vis�tenos, lo estamos esperando.
============================================================
La informaci�n aqu� contenida es confidencial y est� dirigida
solamente a las personas direccionadas en el mail.
No debe ser considerada como recomendaci�n de compra o venta
de valores. Todo acceso no autorizado, uso, reproducci�n, o
divulgaci�n est� prohibido.
Ni SOCIETE GENERALE ni ninguna de sus subsidiarias o filiales
asumir�n responsabilidad ni obligaci�n legal alguna por cualquier
informaci�n incorrecta o alterada contenida en este mensaje.
The information contained herein is confidential and is intended
solely for the addressee(s).  It shall not be construed as a
recommendation to buy or sell any security.  Any unauthorized
access, use, reproduction, disclosure or dissemination is prohibited.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall assume any legal liability or responsibility for any incorrect,
misleading or altered information contained herein.
============================================================


http://www.portalsociete.com
Vis�tenos, lo estamos esperando.

============================================================
La informaci�n aqu� contenida es confidencial y est� dirigida
solamente a las personas direccionadas en el mail.
No debe ser considerada como recomendaci�n de compra o venta
de valores. Todo acceso no autorizado, uso, reproducci�n, o
divulgaci�n est� prohibido.
Ni SOCIETE GENERALE ni ninguna de sus subsidiarias o filiales
asumir�n responsabilidad ni obligaci�n legal alguna por cualquier
informaci�n incorrecta o alterada contenida en este mensaje.

The information contained herein is confidential and is intended
solely for the addressee(s).  It shall not be construed as a
recommendation to buy or sell any security.  Any unauthorized
access, use, reproduction, disclosure or dissemination is prohibited.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall assume any legal liability or responsibility for any incorrect,
misleading or altered information contained herein.
============================================================


Reply via email to