码上敲享录 > java入门知识分享 > java的webservice中获取request和response

java的webservice中获取request和response

上一章章节目录下一章 2019-02-26已有876人阅读 评论(0)

java的webservice中获取request和response


解决方法:

WebServiceContext context = new WebServiceContextImpl();

   MessageContext ctx = context.getMessageContext();

   HttpServletResponse response = (HttpServletResponse) ctx.get(AbstractHTTPDestination.HTTP_RESPONSE);

   HttpServletRequest request = (HttpServletRequest) ctx.get(AbstractHTTPDestination.HTTP_REQUEST);


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
向大家推荐《ireport实战教程》:https://xiaozhuanlan.com/ireport?rel=6923152725
0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交