Cook Computing

XML-RPC.NET Bug

June 19, 2002 Written by Charles Cook

If you use XML-RPC.NET please note the following bug.

If an array occurs in a position in an XML-RPC request or response where the type of its elements is not known AND one or more of its elements is a string specified without the <string> element, an exception is incorrectly thrown by the deserializer. The response below is an example of where the problem occurs.

The two string instances are in an array member of a struct and no type information is available to the serializer. (In this case the array should be parsed into an array of type Object[].)


<?xml version="1.0" encoding="ISO-8859-1"?>
<methodResponse>
 <params>
  <param>
   <value>
    <struct>
     <member>
      <name>key3</name>
      <value>
       <array>
        <data>
         <value>New Milk</value>
         <value>Old Milk</value>
        </data>
       </array>
      </value>
     </member>
    </struct>
   </value>
  </param>
 </params>
</methodResponse>