Forum Discussion

Rene_Single's avatar
Rene_Single
Occasional Contributor
13 years ago

Zip file vs. REST Service

Hi everybody,

I'm struggling with SoapUI to successfully process a zip request and response of a REST service I have (as part of a bigger infrastructure).

The REST service exposes two functions.
- One takes a zip file as input as content of the REST call
- One returns a zip file as response of the REST call

With the first one I have been unable to successfully send a zip file to the service with multiple zip related error messages from the server (depending on the selected encoding of the request). The mime type of the request is set to "application/octet-stream", because that is what the REST Service expects.
I have loaded the Zip file through the "LoadFrom..." entry in the context menu and also tried to load it by hand and assign it to the request property, but to no avail.

With the second one I am unable to write the response Zip file correctly to a File. The closest I get to sucessfully dumping the response to a file, is that I can successfully obtain the Names of the files included in the dumped zip file, but unzipping fails with checksum errors (which lead me to believe there might be encoding issues involved, but I'm not sure).

Both of the above work successfully in the bigger context of the complete application this service is part of, so I'm rather sure this is some issue between me and SoapUI

Is there any obvious support for sending/receiving zipped data in SoapUI I'm missing ?
Or if not, does anybody have experiences concerning these issues he/she could share ?

kind regards

René

2 Replies

  • MNight's avatar
    MNight
    New Contributor

    Greetings everyone!

     

    I'm facing similar issues with REST calls as a topic starter:

    I expecting zip archive as REST response for my call, and after writing it in file I getting errors trying to unzip it, even though I can open archive to see content (list of files).
    I succesed to make same REST call with other instruments (jmeter, for example), but comparing Request|Response Headers with SOAPUI ones in Raw mode I can't see the difference.

     

    Is there any kind additional settings that could help with this issue?

     

    [My request call is a POST with zip file as attachment, Content-type: application/octet-stream, Media-Type: multipart/form-data]