Forum Discussion
12 years ago
I am facing the same problem of I am facing an issue with soapUi while sending an attachment with a POST request it returning http 500 response .
Could you help me out here ?
Below is the request/ response
POST http://hostname/resource/{iD}/attachment HTTP/1.1
Accept-Encoding: gzip,deflate
Accept: application/json, text/plain, */*
Content-Type: multipart/form-data; boundary="----=_Part_9_26847248.1370448182785"
MIME-Version: 1.0
Content-Length: 5103
Host: avenger.int.vb.loc
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
------=_Part_9_26847248.1370448182785
Content-Type: image/jpeg; name=images.jpeg
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="thumbnail"; filename="images.jpeg"
ˇÿˇ‡ JFIF ˇ€Ñ (! % !1!%)+... 783,7(-/,
- - - -- --- - - - - -
HTTP/1.1 500 Internal Server Error
Content-Length: 5762
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 05 Jun 2013 16:03:01 GMT
Could you help me out here ?
Below is the request/ response
POST http://hostname/resource/{iD}/attachment HTTP/1.1
Accept-Encoding: gzip,deflate
Accept: application/json, text/plain, */*
Content-Type: multipart/form-data; boundary="----=_Part_9_26847248.1370448182785"
MIME-Version: 1.0
Content-Length: 5103
Host: avenger.int.vb.loc
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
------=_Part_9_26847248.1370448182785
Content-Type: image/jpeg; name=images.jpeg
Content-Transfer-Encoding: binary
Content-Disposition: form-data; name="thumbnail"; filename="images.jpeg"
ˇÿˇ‡ JFIF ˇ€Ñ (! % !1!%)+... 783,7(-/,
- - - -- --- - - - - -
HTTP/1.1 500 Internal Server Error
Content-Length: 5762
Content-Type: application/json
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 05 Jun 2013 16:03:01 GMT
kvradhika81 wrote: Thanks all.
We are now able to send multipart/mixed request successfully from SOAP-UI/RESTClient to our RESTful Webservice.
Other than the multipart request, the boundary value should as well be set in the Content-Type header as Content-Type ==> multipart/mixed;boundary=Boundary_1_30199356_1283930553295.
Related Content
- 9 months ago