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

java的webservice中获取request和response

上一章章节目录下一章 2019-02-26已有145人阅读 评论(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);


0

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交