Forum Discussion

ashchow's avatar
ashchow
Occasional Contributor
11 years ago

Empty array Vs array with empty elements

I am using an Excel as a data source to populate my requests. soapUI creates arrays with empty elements when there is no data for those elements.

Ex - <get:Dependents>
<get:Dependent>
</get:Dependent>
<get:Dependent/>
<get:Dependent/>
<get:Dependent/>
</get:Dependents>
this requests fails the XSD validation.

How can I create an empty array and not an array with empty elements?
ex- </get:Dependents>

4 Replies

  • ashchow's avatar
    ashchow
    Occasional Contributor
    Yes. And have Remove Empty Content Property set to true. In case of an array, it returns an array with empty elements instead of an empty arry.
  • ashchow's avatar
    ashchow
    Occasional Contributor
    Adding context.RemoveEmptyRecursive = true to the Setup Script of the TestCase did the trick.