My RPC call has an "options" parameter, which is basically a list of
options with name-value pairs. The problem is that the type of the value
is unknown when creating the WSDL. e.g. SOAP call
<MyCall>
<aParam>...</aParam>
<options>
<option>
<name>Username</name>
<value>simon</value>
</option>
<option>
<name>templatefile</name>
<value>
<spec>
<str>abcd3e1==</str>
<charset>ASCII</charset>
<base64>true</base64>
</spec>
<specType>path</specType>
</value>
</option>
<option>
<name>stringreplace</name>
<value>
<str>abcd3e1==</str>
<charset>ASCII</charset>
<base64>true</base64>
</value>
</option>
</options>
</MyCall>
The xsi:type of each <value> can be anything, which is unknown and
undefined when creating the WSDL. Creating a base type that all other
types can extend doesn't work because the schema validator can't
validate the base type.
My solution is to declare all values as strings, and "flatten" out the
XML to something like this:
<option>
<name>templatefile/spec/str</name>
<value>abcd3e1==</value>
</option>
<name>templatefile/spec/charset</name>
<value>ASCII</value>
</option>
<name>templatefile/spec/base64</name>
<value>true</value>
</option>
<name>templatefile/specType</name>
<value>path</value>
</option>
This makes marshalling more difficult, but it works.
Any other solution to allow arbitrary types to be defined in a WSDL
without specifying the schema?
cheers,
Simon