Forum Discussion

restful_soap's avatar
16 years ago

Restful Media-type multipart/form-data incorrectly fills in json object

I'm trying to send a multipart/form-data with the first item being a json object and the second being an image attachment but soapUI automatically fills in the first object as Content-type multipart/form-data. Is there a way to override the content-type setting for the first object?

SoapUI is setting this to:
Content-Type: mulitpart/form-data
Content-Transfer-Encoding: 8bit

But I need the following for the first object:
Content-Disposition: form-data; name="messagePart"
Content-Type: application/json; charset=US-ASCII
Content-Transfer-Encoding: 8bit


I tried to just put that as part of the message but that doesn't override the auto generated items. Any ideas on how I can set this manually?
  • eraghunair's avatar
    eraghunair
    New Contributor
    Any luch with this scenario? Even Im facing a similar issue.

    Trying to post a REST request with attachments as multipart/form-data with one of the parts as JSON.
  • Hi!

    can you attach a simple soapUI project with this rest request (or something equivalent) so we can have a go at fixing this?

    regards!

    /Ole
    eviware.com
  • I'm having a similar issue with pro 3.6.1. Was there ever a resolution to this?
  • Hi,

    we still need a sample project / request to reproduce and fix this.. if you have one please do!

    regards,

    /Ole
    eviware.com