You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Sathija Pavuluri (JIRA)" <ji...@apache.org> on 2007/07/23 20:58:31 UTC

[jira] Created: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
---------------------------------------------------------------------------------------------

                 Key: AXIS2-3001
                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: adb
    Affects Versions: 1.3
         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
            Reporter: Sathija Pavuluri


This bug was introduced after the fix that was made for jira AXIS2-2701.
I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.

The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
It now only works for date format  objects (i.e. yyyy-mm-dd)

For example I have an object with attribute:
java.util.Date timeStarted;

The element in the response looks like this:
<ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>

The deserialization of this element fails with this exception:
        java.lang.RuntimeException: In valid string sufix
        at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
        at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
        at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
        at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
        at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
        at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
        at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)


Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  

Thanks,
Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas updated AXIS2-3001:
------------------------------------

    Fix Version/s: 1.3

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Sathija Pavuluri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514966 ] 

Sathija Pavuluri commented on AXIS2-3001:
-----------------------------------------

The Date object in java contains a complete timestamp with date and time. 
It should be mapped to a dateTime value in XML.

When the Date object is serialized, Axis is serializing it to a dateTime xml value (as can be seen in the xml response in my earlier comment).  
But when it's deserialized, it's attempting to deserialze it as a date xml value which causes the above exception.

The name "Date" in java is a bit misleading, it's not really just a date, it's a timestamp and should be mapped as such to xml.

Axis is now mapping the Calendar object to xml dateTime, but developers seldom use Calendar for literal date (and dateTime) representation.
Calendar is a heavier weight object and is mostly used when date manipulations and conversions are to be made.

This approach that Axis is taking forces Calendar object to be used for dateTime representation when java does provide the more convenient Date object.
This may also be breaking backward compatibility forcing all Date objects that were used for timestamp representation be changed to Calendar objects. 

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Sathija Pavuluri (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515301 ] 

Sathija Pavuluri commented on AXIS2-3001:
-----------------------------------------

To illustrate it better, I am attaching a sample POJO service source and aar file.
If you deploy the aar, and go to the auto-generated wsdl at http://localhost:8080/axis2/services/ManService?wsdl,
you'll see that the Man object is declared as follows:

<xs:complexType name="Man">
  <xs:sequence>
    <xs:element minOccurs="0" name="a" type="xs:int"/>
    <xs:element minOccurs="0" name="address" nillable="true" type="ax21:Address"/>
    <xs:element minOccurs="0" name="dob" nillable="true" type="xs:dateTime"/>
    <xs:element minOccurs="0" name="men" nillable="true" type="xs:anyType"/>
    <xs:element maxOccurs="unbounded" minOccurs="0" name="temp" nillable="true" type="ax21:Address"/>
  </xs:sequence>
</xs:complexType>

See how, the date field dob is shown  as "xs:dateTime".
However, in my Man object (which you can see in the pojosrc.zip) I had dob declared as a java.util.Date object
And when you invoke this service (I have a test class included in the pojosrc.zip that you can use), the response has 
<dob>2007-07-23T17:27:48.017Z</dob>

So now we have this, the auto generated wsdl declares my java.util.Date object as xs:dateTime and serializes it with both date and time parts.
I think up to that point everything is right.

But when deserializing it, it doesnt like the time part.
I think it should take into account the time part too when deserializing a java.util.Date object.


> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Robert Mohn (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515296 ] 

Robert Mohn commented on AXIS2-3001:
------------------------------------

I think your underlying assumption that a java Date object maps to a xml xs:date type is wrong.

A Date object and a Calendar object in java should both map to a xml xs:dateTime type, since both objects contain both date and time.

Right now if I create a new Date object in java with a value of "2007-07-07 12:54pm", then send that date object from a client to a server, the time portion would be stripped off, which is incorrect.

And with how it's working now, it's actually worse than that... the wsdl that is automatically created does map a java Date to a xs:dateTime in the schema -- so the serialization does work correctly (Date gets passed over with both date and time portions), but the code to deserialize the Date object does not work, it assumes that the xml type is 'date' and throws an exception because it's not in YYYY-MM-DD format.




> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe updated AXIS2-3001:
-------------------------------------

    Priority: Blocker  (was: Major)

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515210 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3001:
-----------------------------------------------------

As I saw in the you have declared an xml element as xs:date type and 
you have received a response as 
<ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted> 

So you have received an invalid element(according to the xml spec).

ADB serializes the Date object correctly(only date parts). please have look at with the RC2. 

if you want to parse that response then you have to declare your element as
dateTime instead of date.

But you make one point here. 
Why ADB has used the Calendar to resent the dateTime while it would have used the java.util.Date?

Actually I can not give you an answer this question without going through the code and see any side effects of using the java.util.date. I think this was there from the begining.

Please add a new jira for this as an ADB improvement.


> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Sathija Pavuluri (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sathija Pavuluri updated AXIS2-3001:
------------------------------------

    Attachment: man-service.aar

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: man-service.aar, pojosrc.zip
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Sathija Pavuluri (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sathija Pavuluri updated AXIS2-3001:
------------------------------------

    Attachment: pojosrc.zip

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: man-service.aar, pojosrc.zip
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-3001:
----------------------------------------

    Assignee: Amila Chinthaka Suriarachchi

Amila,
we need to fix this before 1.3 

Thanks
Deepal

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-3001.
-------------------------------------------------

    Resolution: Duplicate

I have reopend the earlier issue 2701. So resoleve this issue (duplicate) and contine the disscussion in that issue.

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: man-service.aar, pojosrc.zip
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12515497 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3001:
-----------------------------------------------------

yes you are correct I have missunderstood the problem. I thought both your server and client uses the ADB generated code. In this case You have used a POJO at the server side and ADB at client side.
in POJO date is mapped to dateTime and when deserializing also it should be considered as dateTime rather than a date. When fixing the earlier bug I have assume that pojo also maps the date to xs:date.
we will revert the earlier change.

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>             Fix For: 1.3
>
>         Attachments: man-service.aar, pojosrc.zip
>
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-3001) Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-3001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514906 ] 

Amila Chinthaka Suriarachchi commented on AXIS2-3001:
-----------------------------------------------------

see http://www.w3.org/TR/xmlschema-2/#date 
the xml date is defined to only have date parts

> Problem in 1.3 RC with deserialization of java.util.Date objects that are DateTime formatted.
> ---------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3001
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3001
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>         Environment: Axis 1.3 RC2, JDK 1.6 on Linux
>            Reporter: Sathija Pavuluri
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Blocker
>
> This bug was introduced after the fix that was made for jira AXIS2-2701.
> I had originally written my comment against 2701 but since the bug is marked as resolved, thought this new issue should be tracked separately.
> The fix for AXIS2-2701 makes it impossible for java.util.Date objects to be deserialized when the date is datetime formatted (i.e. yyyy-mm-dd hh:mm:ss). 
> It now only works for date format  objects (i.e. yyyy-mm-dd)
> For example I have an object with attribute:
> java.util.Date timeStarted;
> The element in the response looks like this:
> <ax26:timeStarted>2007-07-23T13:20:46.861Z</ax26:timeStarted>
> The deserialization of this element fails with this exception:
>         java.lang.RuntimeException: In valid string sufix
>         at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:378)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeDate(SimpleTypeMapper.java:304)
>         at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:117)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:364)
>         at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:644)
>         at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:592)
>         at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:528)
> Looking at the code, it seems like the ConverterUtil expects the Date object to be only of yyyy-mm-dd format.
> It fails in the case when Date is yyyy-mm-dd hh:mm:ss formatted?  
> Thanks,
> Sathija. 

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org