Forum Discussion
SmartBear_Suppo
Alumni
11 years agoHi,
You would have to use some XmlHolder logic still to get the Nodes and set their values to an empty string for instance.
Or you could adapt this script to do what you need: http://www.soapui.org/Scripting-Properties/tips-a-tricks.html#5-2-remove-empty-xml-elements-from-request.
It's certainly possible to have a DataSource that loads values that are the various XML requests that you need to send also. It could be an Excel sheet with with a different request on each row like the attached file. Then you would retrieve the value at each iteration of your DataSource and set it as the current request in your Groovy TestStep. You can see then how that would fit with the business logic you mentioned to populate the request.
Regards,
Giscard
SmartBear Support
You would have to use some XmlHolder logic still to get the Nodes and set their values to an empty string for instance.
Or you could adapt this script to do what you need: http://www.soapui.org/Scripting-Properties/tips-a-tricks.html#5-2-remove-empty-xml-elements-from-request.
It's certainly possible to have a DataSource that loads values that are the various XML requests that you need to send also. It could be an Excel sheet with with a different request on each row like the attached file. Then you would retrieve the value at each iteration of your DataSource and set it as the current request in your Groovy TestStep. You can see then how that would fit with the business logic you mentioned to populate the request.
Regards,
Giscard
SmartBear Support