rsj
16 years agoNew Contributor
Not able to recive a file at REST service endpoint
Hi ,
I am trying to invoke a REST service in my project which receives a file and saves it .
I am invoking it using a REST request in SOAPUI and passing it a .DOC FILE in POST request by setting Media Type as -> multipart form data.
In Request properties i do not check/select "post-query string" option.Service is invoked but service doesn't get the FILE which i pass as multipart form data.
Do i need to pass/set Content-Disposition etc as well , if yes then how?
same REST service when called using a aspx page , works fine and file sent through this page is received and saved by service at other end .
Here is the RAW request of SOAPUI
POST http://xxxxxxxxxxxxx/xxxxxxxxx/xxxxxxxx ... Code=27038 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: multipart/form-data; boundary="----=_Part_1_14396291.1265634509001"
MIME-Version: 1.0
Referer: http://xxxxxxxxxxxxxx/xxxxxxxxxi/Defaultupload.aspx
Connection: keep-alive
Host: xxxxxxxxxxxxxxxx
Content-Length: 29198
------=_Part_1_14396291.1265634509001
Content-Type: multipart/form-data
Content-Transfer-Encoding: 8bit
Raw data follows here...... in multiparts......
Looking forward to some help.
I am trying to invoke a REST service in my project which receives a file and saves it .
I am invoking it using a REST request in SOAPUI and passing it a .DOC FILE in POST request by setting Media Type as -> multipart form data.
In Request properties i do not check/select "post-query string" option.Service is invoked but service doesn't get the FILE which i pass as multipart form data.
Do i need to pass/set Content-Disposition etc as well , if yes then how?
same REST service when called using a aspx page , works fine and file sent through this page is received and saved by service at other end .
Here is the RAW request of SOAPUI
POST http://xxxxxxxxxxxxx/xxxxxxxxx/xxxxxxxx ... Code=27038 HTTP/1.1
Accept-Encoding: gzip,deflate
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Content-Type: multipart/form-data; boundary="----=_Part_1_14396291.1265634509001"
MIME-Version: 1.0
Referer: http://xxxxxxxxxxxxxx/xxxxxxxxxi/Defaultupload.aspx
Connection: keep-alive
Host: xxxxxxxxxxxxxxxx
Content-Length: 29198
------=_Part_1_14396291.1265634509001
Content-Type: multipart/form-data
Content-Transfer-Encoding: 8bit
Raw data follows here...... in multiparts......
Looking forward to some help.