如何使用使用SOAP UI下载文件的RESTful服务(GET)

时间:2016-06-16 11:59:18

标签: web-services rest get soapui

我有一个像这样暴露的REST服务。 注意:请注意标题。

@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();
}

访问以上URI,即http://localhost:8080/home/cmistest/app/documentservices/rest/nodes/21072/content 在浏览器中下载文件。

现在我想从SOAP UI使用与GET服务相同的服务,该服务应该在SOAP UI的响应的Attachments选项卡中列出文件,如下所示enter image description here

如何使用SOAP UI?感谢。

0 个答案:

没有答案