Forum Discussion

rodgersh's avatar
Occasional Contributor
12 years ago

How to POST multipart/form-data with soapui 4.0.1 (free)

I am trying to POST a multipart/form-data with 2 form-data parts. The first part is a String, name="directive" and value="STORE_AND_PROCESS". The second part is the contents of a file (as opposed to a file attachment).

So the POST request looks like this:


Accept-Encoding: gzip,deflate
Content-Type: multipart/form-data; boundary="----=_Part_1_1530692737.1361832805105"
MIME-Version: 1.0
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 10042

Content-Type: multipart/form-data
Content-Transfer-Encoding: 8bit

Content-Disposition: form-data; name="directive"
Content-Disposition: form-data; name="file"; filename="C:\path\to\myfile.json"
Content-Type: application/json

{ "properties":{ "title": "myTitle" } }


I entered the parts into the text area beneath the Media Type drop down (which I set to multipart/form-data). I do not have a Form tab on the REST Test Request screen (is this a soapui Pro feature only?), hence the reason I entered all of this text by hand into this text area.

My REST service is failing to process this request, possibly because the boundary is assigned by soapUI when I send the request and is different than the boundary I entered into the text area.

So how do I send a multipart/form-data POST request using soapUI 4.0.1 free version? (I am on Windows 7).


4 Replies

  • This is my POST request form- data in profile Update ---


    Content-Disposition: form-data; name="user_photo"; filename="1451456913_brodie.jpg"
    Content-Type: image/jpeg

    Content-Disposition: form-data; name="first_name"

    Content-Disposition: form-data; name="last_name"


    Content-Disposition: form-data; name="mobile_no"

    Content-Disposition: form-data; name="address"



     Please  see below screenshot , which I set up for this request. [SoapUI 5.0.1]


           Note -- 1. Select media-type -- multipart/form-data

                       2. Check Post Query String checkbox.


                  I got success message in JSON response "Profile was updated successfully.


  • sesleri's avatar
    New Contributor

    I am having the same issue.  Does anyone have solution?