soapUI is a pretty useful web service testing tool that can help you generate a multitude of tests like load testing, functional testing, data consistency testing and many more. I have started using it for real two days ago when I needed to test some SOAP web services for work. The main issue that kept me from being more productive with this test platform was that nowhere in its documentation one can find how to send null values in a request.
In the soapUI User Guide, in the “Working with Web Service Request” there is a tricky property called Remove Empty Content.
Remove Empty Content : Removes empty elements/attributes from outgoing requests. This can be useful in Data Drive TestRequests which contain elements/attributes that not always contain data and should be removed in those cases.
What I understand from this property is that if I have an empty field that I would like not to be transmitted further into my request, setting this property to true, the field will be marked as null and transmitted like that. Well, the result isn’t the one you would have expected. Doing like that will only bring you more and more frustrations as the only thing you will obtain will be a beautifully crafted server error complaining that some fields don’t have proper values (the errors are more technical like ”invalid date format or argument”, ”value expected for … field”).
So, answering the question ”How to send null data in a request with soapUI?”, the thing that you should do is to mark the respective field like this:
or, assuming that you do not want to write this kind of attributes for many empty fields in a request, something like this:
1 2 3 4 5 6 7 8 9 10