我正在使用 Axis2 作为移动应用程序的 REST Web 服务,我正在编写一个进入 Axis2 IN 流的自定义阶段的安全处理程序,并且我在从请求中获取 POST 参数时遇到了一些麻烦;使用 GET 方法时,我能够成功检索这些参数,但在 POST 情况下,我得到的只是空值。非常感谢任何帮助
这是我的代码片段:
public InvocationResponse invoke(MessageContext mc) throws AxisFault {
AxisMessage axisMessage = mc.getAxisMessage();
System.out.println("***SecurityHandler Starting***");
HttpServletRequest req =(HttpServletRequest)mc.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
System.out.println("Method : "+req.getMethod());
String username = req.getParameter(ARG_LOGIN);
System.out.println("User login : "+ username);// User login : null
}