[ 
https://issues.apache.org/jira/browse/AXIS2-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884033#action_12884033
 ] 

Oleg Zenzin commented on AXIS2-4370:
------------------------------------

I cannot agree with Mauro. Here's the very first line from Sun Java API for 
each class:
"The Calendar class is an abstract class that provides methods for 
converting..."
"The class Date represents a specific instant in time, with millisecond 
precision..."

Second, according to specification "XML Schema Part 2: Datatypes..." both types 
(xsd:dateTime and xsd:date ) have optional timezone field. Why keeping 
java.util.Date for xsd:date and not allowing it for xsd:dateTime than?

Third: mapping java.util.Date to xsd:date actually makes the information (time 
part) being lost! Any reasoning behind this?

Forth: there's nothing in xsd:dateTime lexical representation as compared to 
xsd:date which makes you lean towards Calendar versus Date. Indeed the only 
difference is that it omits time part ("let the "date portion" of a dateTime or 
date object be an object similar to a dateTime or date object, with similar 
year, month, and day properties, but no others, having the same value for these 
properties as the original dateTime or date object").

Having two mappings for date in general case looks overwhelming. And looking to 
SQL mappings, I'd rather leave Date, at least it's more intuitive...

> Time portion of java.util.Date is missing from SOAP response in Axis2 1.5
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4370
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4370
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.5
>            Reporter: Pétur Runólfsson
>         Attachments: Server-1.4.1.wsdl, Server-1.5.wsdl, Server.java, 
> services.xml
>
>
> When a method returns a java.util.Date (or an object containing a 
> java.util.Date), only the date portion is returned in Axis2 1.5:
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>    <soapenv:Body>
>       <ns:getCurrentTimeResponse xmlns:ns="http://ws.apache.org/axis2";>
>          <ns:return>2009-06-10</ns:return>
>       </ns:getCurrentTimeResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
> In Axis2 1.4.1, the full date and time was returned:
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>    <soapenv:Body>
>       <ns:getCurrentTimeResponse xmlns:ns="http://ws.apache.org/axis2";>
>          <ns:return>2009-06-10T16:22:22.622Z</ns:return>
>       </ns:getCurrentTimeResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
> This change breaks any application that requires the time portion to function 
> correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to