axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Staerk (JIRA)" <>
Subject [jira] Created: (AXIS2-1624) RPCMessageReceiver serializes java.util.Date not as "xs:dateTime"
Date Mon, 06 Nov 2006 21:20:38 GMT
RPCMessageReceiver serializes java.util.Date not as "xs:dateTime"

                 Key: AXIS2-1624
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: rpc
    Affects Versions: nightly
         Environment: Windows XP
            Reporter: Robert Staerk

I don't know whether this is a bug or a feature.

When I return an object with two fields, one of type java.util.Calendar and the other of type
java.util.Date I get the following SOAP response:

<soapenv:Envelope xmlns:soapenv = "">
        <ns:getDatesResponse xmlns:ns = "">
                <calendar xmlns = "">2006-11-06T21:03:39.781Z</calendar>
                <date xmlns = "">Mon Nov 06 22:03:39 CET

Both fields are of type  "xs:dateTime" in the generated WSDL (see attachment).

The generated ADB client, however, can for obvious reasons not parse the "Mon Nov 06 22:03:39
CET 2006" and generates the following exception:

Exception in thread "main" java.lang.RuntimeException: java.lang.NumberFormatException
	at com.mydomain.service.DatingServiceStub.fromOM(
	at com.mydomain.service.DatingServiceStub.getDates(
	at test.DateTest.main(
Caused by: java.lang.NumberFormatException
	at org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(
	at com.mydomain.service.DatingServiceStub$MyDate$Factory.parse(
	at com.mydomain.service.DatingServiceStub$GetDatesResponse$Factory.parse(
	at com.mydomain.service.DatingServiceStub.fromOM(
	... 2 more

Why does RPCMessageReceiver treat java.util.Date differently than java.util.Calendar? 

I am trying to move severeal Axis 1.3 services to Axis2 and in Axis 1.3 a java.util.Date was
serializes as "xs:dateTime".

Regards, Robert

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message