wash_out
wash_out copied to clipboard
Changing xsi:type for arrays
How can I produce the following output for my errors
array as part of my XML response?
<Errors soapenc:arrayType="tns:Error[0]" xsi:type="soapenc:Array" />
I am calling render soap: {errors: []}
to try to produce my result. There are no issues with mismatches with my return
definition. Calling render soap: {errors: [{item: 1}]}
works just fine.
There are three issues for me:
- Updating the
xsi:type
to besoapenc:Array
- Adding the metadata of
soapenc:arrayType="tns:Error[0]"
where0
corresponds to number of children nested under this node - Rendering empty node when the array is empty