Forum Discussion

padeba2019's avatar
padeba2019
New Contributor
6 years ago

how to convert a curl to a rest soapui request?

The curl to convert is: curl -v -u <username>:<pwd> -F "HTML_FILE=@file.txt" http://<IP>:<port>/FileUploader

Is related to a POST request with a file in attach.

The soap project I created responds with:

<HTML>

   <HEAD>

         <TITLE>Errore</TITLE>

  </HEAD>

   <BODY>

               <P>Prefisso [HTML_FILE] per il file upload non presente</P>

   </BODY>

</HTML>.

 

The request is:

POST http://<IP>:<port>/FileUploader HTTP/1.1

Accept-Encoding: gzip,deflate

Content-Type: multipart/form-data; boundary="----=_Part_0_42445617.1561033902948" MIME-Version: 1.0

Content-Length: 380

Host: <IP>:<port>

Connection: Keep-Alive

User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

Authorization: Basic MDgxNzc3NzowODE3Nzc3 ------=_Part_0_42445617.1561033902948

Content-Type: text/plain; charset=Cp1252; name=file.txt

Content-Transfer-Encoding: binary

Content-Disposition: form-data; name="file.txt"; filename="file.txt" PROVA 20170508123151839056 SR=N VP=10 messaggio di Buongiorno 20170508123151839056 3390000000 3390000001 3390000002 3390000003 ; . ------=_Part_0_42445617.1561033902948--

Could you give me support to solve the problem?

 

 

No RepliesBe the first to reply