![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
restful
含笑半步癫123
这个作者很懒,什么都没留下…
展开
-
restful服务端无法获取post参数的解决方法
使用spring + cxf 搭建的restful webservice,在接收post请求参数时,我使用如下方法来解析:public class InMessageInterceptor extends AbstractPhaseInterceptor {public InMessageInterceptor() {super(Phase.PRE_INVOKE);}.....原创 2016-11-10 15:14:34 · 7835 阅读 · 0 评论 -
cxf+spring自定义restful接口返回消息
因项目需要,需要对外提供webservice接口。之前也没有写过这种接口,不知道用那种框架好。上网搜索了一堆材料,最终决定使用cxf+spring实现restful风格的方式。接口的返回数据,我准备支持xml和json两种格式,根据请求url的后缀(.json或.xml)返回相应格式的数据。我自己定义了返回数据格式:{ "errcode": 0, "errmsg":原创 2016-11-14 13:33:38 · 2363 阅读 · 0 评论 -
JAVA CXF、XFIRE、AXIS webservice获取客户端IP
import javax.annotation.Resource;import javax.servlet.http.HttpServletRequest;import javax.xml.ws.WebServiceContext;import org.apache.axis.MessageContext;import org.apache.axis.transport.h转载 2016-11-16 14:59:31 · 370 阅读 · 0 评论