axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lin, Yaxiong" <lin.yaxi...@mayo.edu>
Subject RE: Java.sql.date schema mapping
Date Sun, 15 Feb 2004 03:56:09 GMT

I should give more details on my question below.

My java class has java.sql.Date attributes (either defined in the current class or in the
ancestor class). After I deploy this java class with the wsdd using the beanMapping of beanSerializer/beanDeserializer,
I examine the wsdl axis generated (with http://xxx/services/mySvc?wsdl), the java.sql.Date
attributes are mapped to xds:Date (I was expecting xds:DateTime), and axis sends the response
with xds:Date which is consistent with the wsdl it generated, but it truncated the time from
my java.sql.Date attribute.

Then in my testing axis client, I got the bean desearlizer exception saying can not place
java.util.Date into the java.sql.Date of the same java class.  Apparently axis deserialized
xds:Date into a java.util.Date and tried to place it to java.sql.Date in my java class.

So, my questions are:
1. What should java.sql.Date containing date/time be mapped to: xds:Date or xds:DateTime?
2. Why axis has problem in deserializing the date data element in the response it generates?

Hope this is enough details.

Thanks.

- Yaxiong Lin



> -----Original Message-----
> From:	Lin, Yaxiong [SMTP:lin.yaxiong@mayo.edu]
> Sent:	Friday, February 13, 2004 9:42 AM
> To:	'axis-user@ws.apache.org'
> Subject:	Java.sql.date schema mapping
> 
> 
> 
> Is there anyway to force java.sql.Date to be mapped to "DateTime" in axis 1.1 and still
using "org.apache.soap.encoding.soapenc.BeanDeserializer and org.apache.soap.encoding.soapenc.BeanSerializer"?
 I am using the beanMapping and the wsdl axis generates maps java.sql.Date to "Date" data
type.  This question was posted before by someone else, but I don't see the resolution posted.
> 
> I understand I could change the java class definition to use java.util.Calendar or some
other date class, but unfortunately this is not an option for me.  I would appreciate any
help on this.
> 
> Thanks. 
> 
> - Yaxiong Lin 
>   Mayo Clinic 
>   Rochester, MN 55905 
> 

Mime
View raw message