0

I tested REST services with DHC application for Chrome, and POST requests were successful with these parameters: DHC_successful_POST

But when I try to create the same request in SoapUI, I always get 500 error. Probably, there should be some other parameters or settings in SoapUI, but I cannot see it. What is wrong? Here is my request: SoapUI_POST_500_fault

P.S. In DHC there is such code for my request:

curl -i -X POST \ -H "Content-Type:multipart/form-data" \ -F "file=" \ -F "fileName=rich-text.zip" \

So, I just need to find settings for these parameters in SoapUI (free version). Are there any suggestions?

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • You should be able to check the difference by comparing the two raw request. By the way, the information available in the question is inadequate. – Rao Feb 08 '16 at 14:35
  • Thank you! In DHC raw request I see: 'POST /rest/templates HTTP/1.1 Host: _localhost:port_ Content-Type: multipart/form-data;boundary=------FormBoundary152c161cca2 Content-Length: 263 ------FormBoundary152c161cca2 Content-Disposition: form-data; name="file"; filename="" Content-Type: application/octet-stream' ------FormBoundary152c161cca2 Content-Disposition: form-data; name="fileName" rich-text.zip ------FormBoundary152c161cca2-- But in SoapUI it is different, you are right. I need to post it through SoapUI as "form", but I can't find this option in the SoapUI – Aleksandra Kochubey Feb 08 '16 at 15:05
  • Did you try `http request` test step type? – Rao Feb 09 '16 at 11:59
  • Yes, I used HTTP step as well as REST, but it didn't help, result was the same. – Aleksandra Kochubey Feb 09 '16 at 16:44

1 Answers1

0

As per this (see attachments section)you've to append file: to your parameter value to be able to send the content of file as multipart/form-data

user1207289
  • 3,060
  • 6
  • 30
  • 66