You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Jimisola Laursen <li...@jimisola.com> on 2006/11/14 16:41:37 UTC

Possible de-serialization bug

Hi,

I found a bug (limitation in the XMLRPC library when it comes to
de-serializing Maps.

API method is:

 setSomething(Map<Integer, String> something)

However, when the map is de-serialized/reconstructred on the server-side the
key is not an integer. It is instead a char array (i.e. char[]).

That is,

on client:

 key: Integer(11)
 value: String("somestring")

becomes:
 
 key: char[2] {'1','1'}
 value: String("somestring")

on server. Is this by design or is this a bug?

I am using Java 1.5, so I understand if generics don't work but
serialization/de-serialization shouldn't be affected by that or?

Regards,
Jimisola


-- 
View this message in context: http://www.nabble.com/Possible-de-serialization-bug-tf2630162.html#a7339931
Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org


Re: Possible de-serialization bug

Posted by Jimisola Laursen <li...@jimisola.com>.
Filed as http://issues.apache.org/jira/browse/XMLRPC-127 with sample code.

Hope that I am not doing something wrong...

Regards,
Jimisola

PS. No feedback on http://issues.apache.org/jira/browse/XMLRPC-125 yet.. DS.


Jochen Wiedmann wrote:
> 
> On 11/20/06, Jimisola Laursen <li...@jimisola.com> wrote:
> 
>> Did you miss the original posting and if so, do you have any input on
>> this
>> possible issue?
> 
> Yes, I am unaware of this posting.
> 
>> > on client:
>> >
>> >  key: Integer(11)
>> >  value: String("somestring")
>> >
>> > becomes:
>> >
>> >  key: char[2] {'1','1'}
>> >  value: String("somestring")
>> >
>> > on server. Is this by design or is this a bug?
> 
> I can hardly imagine that this might be the case. Note, that maps are,
> of course, a part of the test suite. If you have something
> reproducable, please file a bug report, preferrably with sample code.
> 
> Jochen
> 
> -- 
> My wife Mary and I have been married for forty-seven years and not
> once have we had an argument serious enough to consider divorce;
> murder, yes, but divorce, never.
> (Jack Benny)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Possible-de-serialization-bug-tf2630162.html#a7477796
Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org


Re: Possible de-serialization bug

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 11/20/06, Jimisola Laursen <li...@jimisola.com> wrote:

> Did you miss the original posting and if so, do you have any input on this
> possible issue?

Yes, I am unaware of this posting.

> > on client:
> >
> >  key: Integer(11)
> >  value: String("somestring")
> >
> > becomes:
> >
> >  key: char[2] {'1','1'}
> >  value: String("somestring")
> >
> > on server. Is this by design or is this a bug?

I can hardly imagine that this might be the case. Note, that maps are,
of course, a part of the test suite. If you have something
reproducable, please file a bug report, preferrably with sample code.

Jochen

-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org


Re: Possible de-serialization bug

Posted by Jimisola Laursen <li...@jimisola.com>.
Jochen,

Did you miss the original posting and if so, do you have any input on this
possible issue?

Regards,
Jimisola


Jimisola Laursen wrote:
> 
> Hi,
> 
> I found a bug (limitation in the XMLRPC library when it comes to
> de-serializing Maps.
> 
> API method is:
> 
>  setSomething(Map<Integer, String> something)
> 
> However, when the map is de-serialized/reconstructred on the server-side
> the key is not an integer. It is instead a char array (i.e. char[]).
> 
> That is,
> 
> on client:
> 
>  key: Integer(11)
>  value: String("somestring")
> 
> becomes:
>  
>  key: char[2] {'1','1'}
>  value: String("somestring")
> 
> on server. Is this by design or is this a bug?
> 
> I am using Java 1.5, so I understand if generics don't work but
> serialization/de-serialization shouldn't be affected by that or?
> 
> Regards,
> Jimisola
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Possible-de-serialization-bug-tf2630162.html#a7434742
Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org