CaryB
12 years agoContributor
[Registered] Enhancement for nil="true" in Form View
We've recently stumbled upon a "feature" that's causing us some heartburn. In 1.7.5 it looks like a "bug" was fixed to 'Fixed form-editor to insert xsi:nil="true" on empty nillable fields.' So what happens today is if the user is in form view and doesn't populate a nillable element, SoapUI adds a namespace to the element and sets it to nil. When the user switches to xml view, this is what they see:
Unfortunately for us, nil isn't empty. It means that the backend field is to be cleared of its existing value. So with the tool automatically setting the element to nil the user may be inadvertently wiping out data on the backend. For example,
will set the backend data element for SomeElement to 'NewValue'. If you run the request again with more elements:
then SomeOtherElement will be updated but SomeElement will be deleted.
So, I'd like to see this as an option that we can control through the editor settings or wherever it makes sense.
<SomeElement xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
Unfortunately for us, nil isn't empty. It means that the backend field is to be cleared of its existing value. So with the tool automatically setting the element to nil the user may be inadvertently wiping out data on the backend. For example,
<SomeElement>NewValue</SomeElement
will set the backend data element for SomeElement to 'NewValue'. If you run the request again with more elements:
<SomeElement xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
<SomeOtherElement>AnotherNewValue</SomeOtherElement
then SomeOtherElement will be updated but SomeElement will be deleted.
So, I'd like to see this as an option that we can control through the editor settings or wherever it makes sense.