cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chandra Siva <chan...@zappli.com>
Subject POST data missing in Context
Date Thu, 12 May 2011 18:33:16 GMT
I have a rather simple service that uses HTTPServletRequest to get at POST data from the client.
When this is deployed inside a servlet container (tomcat) with a CXFServlet it consumers the
POST data and request.getParameter returns null inside the service. When I use a MultiValuedMap
instead of HTTPServletRequest, it works fine. This is very similar to the bug that was reported
earlier but it was closed as invalid: https://issues.apache.org/jira/browse/CXF-2993

What am I missing?

PS: I looked at the integration test that Sergey mentioned. The only difference I can see
between that test and my situation is the fact that I am using a servlet destination for all
requests.

@Path("/oauth2/token") 
public class TokenEndpoint {

@POST 
@Consumes("application/x-www-form-urlencoded")
@Produces("application/json")
public Response authorize(@Context HttpServletRequest request) throws OAuthSystemException
{

String grantType = request.getParameter("grant_type");


Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message