cdunne
17 years agoContributor
Listeners - Modifying Requests before posting to a Service
Hi,
We have a large number of optional elements in our Service requests. One of the issues I am coming accross regularly is a number of them cannot be passed as empty tags due to the type declaration.
We have build a framework driven from excel datasheets but we don't want to have to build large numbers of template requests based on different business rules.
Is there a way of only stripping the empty optional elements before a request is sent to the service? Does SoapUI Pro have this functionality or do I need to script something to handle it?
One way I thought would be to have a listener that calls a script to remove any empty elements from the request by default unless specified in the datasheet. Is this possible? I can't find any examples of using a listener on a particular test step or any examples of where I would start.
Thanks
Darren
We have a large number of optional elements in our Service requests. One of the issues I am coming accross regularly is a number of them cannot be passed as empty tags due to the type declaration.
We have build a framework driven from excel datasheets but we don't want to have to build large numbers of template requests based on different business rules.
Is there a way of only stripping the empty optional elements before a request is sent to the service? Does SoapUI Pro have this functionality or do I need to script something to handle it?
One way I thought would be to have a listener that calls a script to remove any empty elements from the request by default unless specified in the datasheet. Is this possible? I can't find any examples of using a listener on a particular test step or any examples of where I would start.
Thanks
Darren