Skip to content

Wrong XMLRPCCommon Object array serialization #41

Description

@GoogleCodeExporter
If the serializeParams() method in XMLRPCCommon.java is given more than one 
parameter to serialize, the output is not strict to XMLRPC (though some client 
implementations e.g. Python xmlrpclib will still read it).
Each parameter is put into a separate <param> tag. However, only one <param> is 
allowed to occur in <params>

The output looks like:
<params>
  <param><value><i4>12</i4></value></param>
  <param><value><string>Egypt</string></value></param>
  <param><value><boolean>0</boolean></value></param>
  <param><value><i4>-31</i4></value></param>
</params>


The correct output would rather be:
<params>
  <param>
    <array>
      <data>
        <value><i4>12</i4></value>
        <value><string>Egypt</string></value>
        <value><boolean>0</boolean></value>
        <value><i4>-31</i4></value>
        </data>
    </array>
  </param>
</params>


The XMLRPCSerializer class can already generate this type of output. The only 
change required is for XMLRPCCommon.serializeParams(Object [] params) to not 
loop over each of the array entries and call the Serializer independently but 
to just give the array directly to the Serializer.

Original issue reported on code.google.com by f.metz...@gmail.com on 20 Aug 2012 at 9:19

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions