java CXF客户端上传调用REST服务的文件(http://wwwdev.arag.it/webservices/sinistri/allega/?id_ds=83817&categori
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java CXF客户端上传调用REST服务的文件(http://wwwdev.arag.it/webservices/sinistri/allega/?id_ds=83817&categori相关的知识,希望对你有一定的参考价值。
<jaxrs-client:client id="allegatiUploadClient"
address="${rs-allegati-upload.host}" username="${rs-allegati-upload.username}"
password="${rs-allegati-upload.password}"
serviceClass="it.intesys.arag.portlet.denuncia.service.impl.AllegatiUploadClient"
inheritHeaders="true">
<jaxrs-client:headers>
<entry key="Accept" value="application/json" />
</jaxrs-client:headers>
<jaxrs-client:providers>
<ref bean="jsonProvider" />
</jaxrs-client:providers>
</jaxrs-client:client>
public interface AllegatiUploadClient {
@POST
@Path("/webservices/sinistri/allega/")
@Consumes("multipart/form-data")
@Produces(MediaType.APPLICATION_JSON)
AllegatiUploadServiceResult upload(@Multipart Attachment allegato,
@QueryParam(value = "categoria") String categoria,
@QueryParam(value = "id_ds") String idDenuncia);
}
以上是关于java CXF客户端上传调用REST服务的文件(http://wwwdev.arag.it/webservices/sinistri/allega/?id_ds=83817&categori的主要内容,如果未能解决你的问题,请参考以下文章
cxf webservice生成客户端代码及调用服务端遇到的问题
[CXF REST标准实战系列] Spring4.0 整合 CXF3.0,实现测试接口(转)
java cxf 调用IIS服务报错Cannot create a secure XMLInputFactory 问题
CXF的JaxWsDynamicClientFactory调用服务端,服务端收到参数为空
cxf如何创建webservice客户端
webservice发布服务:CXF及客户端调用