Comment #4 on issue 41 by
f.metz...@gmail.com: Wrong XMLRPCCommon Object
array serialization
http://code.google.com/p/android-xmlrpc/issues/detail?id=41
There is still something missing in XMLRPCCommon. The varargs parameter of
serializeParams(Object... params) is again just autoboxed into an Object[],
which the method would loop over and put every Object in the array in a
separate <param></param>.
Instead, you could remove the for-loop and give the array directly to the
serializer.
Maybe something like this:
protected void serializeParams(Object... params) throws
IllegalArgumentException, IllegalStateException, IOException {
if (params != null && params.length != 0)
{
serializer.startTag(null, Tag.PARAMS);
serializer.startTag(null, Tag.PARAM).startTag(null,
IXMLRPCSerializer.TAG_VALUE);
if (params.length > 1)
iXMLRPCSerializer.serialize(serializer, params);
else
iXMLRPCSerializer.serialize(serializer, params[0]);
serializer.endTag(null, IXMLRPCSerializer.TAG_VALUE).endTag(null,
Tag.PARAM);
serializer.endTag(null, Tag.PARAMS);
}
}