rozdobudko
13 years agoNew Contributor
Can't upload document via SoapUI, cURL works
Hi Dear SmartBear support team,
My task is upload document on the service via SoapUI.
I use the latest version -soapUI Pro 4.5.0, Build [internal], Build Date 2012/04/24 00:26.
It's easily uploaded by cURL (I use the following: curl -X POST -H 'Content-Type: multipart/form-data' -F "file=@test.png"<mailto:file=@test.png> http://<some URL> ), and upload is failed when I use SoapUI. Service says about bad request(400). It seems like nothing is uploaded.
How it seems in cURL:
$ curl -X POST -H 'Content-Type: multipart/form-data' -F "file=@test.png"<mailto:file=@test.png> http://<some URL> -v
* About to connect() to <some URL> port 8080 (#0)
* Trying <some IP> ... connected
* Connected to <some URL> (<some IP>) port 8080 (#0
)
> POST /orchestration-web/resource/document/vShopper_test_a_489 HTTP/1.
1
> User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8k zlib/1
.2.3
> Host: <some URL>
> Accept: */*
> Content-Length: 6630
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------7d9c1b
6ddf63
>
< HTTP/1.1 100 Continue
< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Location: <some URL>
< Content-Length: 0
< Date: Fri, 27 Apr 2012 15:32:36 GMT
<
* Connection #0 to host <some URL> left intact
* Closing connection #0
How SoapUI represents it - look in the attachments.
So, my question is how to upload a document via SoapUI(analog to the cURL)?
My task is upload document on the service via SoapUI.
I use the latest version -soapUI Pro 4.5.0, Build [internal], Build Date 2012/04/24 00:26.
It's easily uploaded by cURL (I use the following: curl -X POST -H 'Content-Type: multipart/form-data' -F "file=@test.png"<mailto:file=@test.png> http://<some URL> ), and upload is failed when I use SoapUI. Service says about bad request(400). It seems like nothing is uploaded.
How it seems in cURL:
$ curl -X POST -H 'Content-Type: multipart/form-data' -F "file=@test.png"<mailto:file=@test.png> http://<some URL> -v
* About to connect() to <some URL> port 8080 (#0)
* Trying <some IP> ... connected
* Connected to <some URL> (<some IP>) port 8080 (#0
)
> POST /orchestration-web/resource/document/vShopper_test_a_489 HTTP/1.
1
> User-Agent: curl/7.21.1 (i686-pc-mingw32) libcurl/7.21.1 OpenSSL/0.9.8k zlib/1
.2.3
> Host: <some URL>
> Accept: */*
> Content-Length: 6630
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------7d9c1b
6ddf63
>
< HTTP/1.1 100 Continue
< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Location: <some URL>
< Content-Length: 0
< Date: Fri, 27 Apr 2012 15:32:36 GMT
<
* Connection #0 to host <some URL> left intact
* Closing connection #0
How SoapUI represents it - look in the attachments.
So, my question is how to upload a document via SoapUI(analog to the cURL)?