I had previously posted this on GitHub but as per the kind suggestion of another user, moved it here.
I need to form a request with (among others) elements defined as such:
<xsd:element maxOccurs="1" minOccurs="1" name="procedures" nillable="true" type="tns:ArrayOfString"/>
I believe my output should look like:
<tns:procedures>
<tns:string>7498</tns:string>
<tns:string>9492</tns:string>
</tns:procedures>
and
<tns:procedures>
</tns:procedures>
when the list of procedures is empty.
What's the proper way to do this ? I've tried by passing the procedures key an empty list, but this seems to produce the following in the request instead:
<tns:procedures>7498</tns:procedures>
<tns:procedures>9492</tns:procedures>
Passing nil as the value also does not work.
Any help would be greatly appreciated. I couldn't learn much online about ArrayOf constructs, nor could I seem to find relevant examples.
Thanks so much - with Savon I've already gone way beyond what I was capable of doing before with SOAP - though clearly I have a lot to learn.
<tns:procedures> <tns:string>7498</tns:string> <tns:string>9492</tns:string> </tns:procedures>
<tns:procedures>7498</tns:procedures>
<tns:procedures>9492</tns:procedures>