Upload file using SOA UI
This article demonstrates how to upload file to a RESTful web service. Using SoapUI for testing web services may hasten the development of an application since we do not need to wait for a working UI. We’ll use SoapUI OpenSource 5.2.1. This is a free version and can be downloaded from
Configure a Request
After you created a request, you may now configure it as shown on the image below. There are 5 items to take note of.
- The method
You may specify either POST or PUT.
- Request Parameter Value
When uploading a file instead, the text value needs to be in a specific format, i.e., file:<PATH_AND_FILE_NAME>
- Media Type
This must be set to “multipart/form-data”
- Post QueryString
This must be ticked
You need to attached the file referred to by the Request Parameter Value (item 2). Take note of the “Cached” column. When you attach a file, SoapUI asks you whether or not to cache the file. If an attachment is cached, a copy of the original file is temporarily saved and sent everytime the request is sent to the RESTful web service.