Sandro2020
5 years agoNew Contributor
Remove attribute from request
Hi,
I have a simple SOAP request in XML format below. The attributes extension and root are referencing from the DataSource.
<v3:providerOrganizationID>
<v3:value extension="${DataSource#UPI}" root="${DataSource#Root}" />
</v3:providerOrganizationID>
And I have a negative test cases where the Extension and Root may have an Empty value in the DataSource. Is there an option specified in Ready! API to remove the attribute when the extension and root attributes are set to Empty? So, the outcome would become
<v3:providerOrganizationID>
</v3:providerOrganizationID>
Thanks.
- Please see if the below thread helpful
https://stackoverflow.com/questions/35826398/remove-a-specific-xml-node-with-namespace-using-groovy