One thing I've noticed with all the XML-RPC examples out there, including the spec itself, is there is no detailed example of a schema using recursive (param) values. It is hard to understand what should actually be possible within XML-RPC without these illustrations, and I wonder if someone could help me get a better handle on it.
The spec says:
<struct>s can be recursive, any <value> may contain a <struct> or any other type, including an <array>, described below.
<arrays>s can be recursive, any value may contain an <array> or any other type, including a <struct>, described above.
Does that mean it is perfectly legal to do the following:
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>lowerBound</name>
<value>
<struct>
<member>
<name>lowerBound</name>
<value><i4>18</i4></value>
</member>
<member>
<name>upperBound</name>
<value><i4>139</i4></value>
</member>
</struct>
</value>
</member>
<member>
<name>upperBound</name>
<value><i4>139</i4></value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>
Is it possible to also do this:
<?xml version="1.0"?>
<methodCall>
<methodName>examples.getStateName</methodName>
<params>
<param>
<value>
<array>
<data>
<value><i4>12</i4></value>
<value>
<struct>
<member>
<name>lowerBound</name>
<value>
<struct>
<member>
<name>lowerBound</name>
<value><i4>18</i4></value>
</member>
<member>
<name>upperBound</name>
<value><i4>139</i4></value>
</member>
</struct>
</value>
</member>
<member>
<name>upperBound</name>
<value><i4>139</i4></value>
</member>
</struct>
</value>
<value><boolean>0</boolean></value>
<value><i4>-31</i4></value>
</data>
</array>
</value>
</param>
</params>
</methodCall>
I'm trying to write an implementation and I need to know all the possibilities, and what to check for when traversing through someone's schema on the server side. With the way the spec reads it appears that you can nest arrays and structs interchangeably, but I wanted to verify that is true. Thanks!