Issue 29 in android-xmlrpc: xmlrpc reverses order of data

2 views
Skip to first unread message

android...@googlecode.com

unread,
Aug 3, 2011, 12:55:02 PM8/3/11
to android-x...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 29 by borszc...@gmail.com: xmlrpc reverses order of data
http://code.google.com/p/android-xmlrpc/issues/detail?id=29

It looks like this library reverses order of data exposed by server. If
i.e. server returns:

key1 = val1
key2 = val2

I get

key2 = val2
key1 = val1

It's not a major issue, yet sometimes order matters if method you are
calling is expected to return sorted data. Sure you can sort things
yourself but that a waste anyway.

android...@googlecode.com

unread,
Aug 3, 2011, 3:51:57 PM8/3/11
to android-x...@googlegroups.com

Comment #1 on issue 29 by j...@sprig.gs: xmlrpc reverses order of data
http://code.google.com/p/android-xmlrpc/issues/detail?id=29

I'm struggling to see where this is occurring in the code (and in fact, was
never aware of it happening). Is there any chance you can step through your
code and check whether the issue might perhaps be occurring for you at line
181 of XMLRPCSerializer.java?

http://code.google.com/p/android-xmlrpc/source/browse/trunk/XMLRPC/src/org/xmlrpc/android/XMLRPCSerializer.java#181

It may be that list.add is adding the entry to the top of the array rather
than the bottom, but, like I said, I wasn't aware of it happening.

android...@googlecode.com

unread,
Oct 20, 2011, 1:01:35 PM10/20/11
to android-x...@googlegroups.com

Comment #2 on issue 29 by tim.r...@gmail.com: xmlrpc reverses order of
data
http://code.google.com/p/android-xmlrpc/issues/detail?id=29

I guess you have this problem within the struct element?
If so, you are anyway not allowed to rely on the order of the elements.
The specification explicit says: "The struct element does not preserve the
order of the keys. The two structs are equivalent." - see
http://www.xmlrpc.com/spec

I guess this has been specificated so that there is no problem in using
HashMaps that (depending on the hash function) do not preserve element
order.

Reply all
Reply to author
Forward
0 new messages