1

I have a REST service exposed like this. Note:Please observe the headers too.

@GET
@Path("/{id}/content")
@Produces({ MediaType.APPLICATION_OCTET_STREAM })
public Response getDocumentContentById(@PathParam("id") String id) {
ResponseBuilder responseBuilder = Response.ok(Some object);
responseBuilder.header("Content-Disposition", "attachment; filename=" + nodeContent.getName());
return responseBuilder.build();
}

Accessing above URI i.e. http://localhost:8080/home/cmistest/app/documentservices/rest/nodes/21072/content in a browser would download a file.

Now I want to consume the the same service from SOAP UI as GET service which should list the file in Attachments tab of response in SOAP UI as shown belowenter image description here

How can I consume from SOAP UI? Thanks.

Siva R
  • 427
  • 2
  • 8
  • 23
  • The screen shot shows `Zero attachments`. Even if you get what type of attachments are you expecting? When you receive attachment, it shall allow to save the file. Is that you want to save them automatically? – Rao Jun 16 '16 at 13:24
  • @Rao Yes, I'm expecting the file should be saved(or asked to save some way) in attachments tab of the response. – Siva R Jun 17 '16 at 04:17
  • Please find the [documentation](https://www.soapui.org/blog/working-with-ws-attachments-and-inline-files.html#1-4-5-Response-Attachments) to see if that helps. By the way, what type of file that you are expecting? Is it one or multiple files? – Rao Jun 17 '16 at 04:43
  • 1
    Bumping into a similar issue. The usecase: We have a service that retrieves image files. They are retrieved with a resource analogous to the one the OP gives. In the RAW message I can see a base64 encoded string between quotes. The file (picture file, jpg, sent with Content-Type multipart/form-data) is presented as a download in the browsers IE 11, chrome and firefox. I don't see any attachments in SoapUI either. It would be helpful to get a hold of these bytes in a robust way. – Matthias dirickx Jun 09 '17 at 12:27

0 Answers0