cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Charon <Julien.Cha...@avitech.aero>
Subject CXF 3.0.7 JAXRS POST application/x-www-form-urlencoded
Date Fri, 04 Dec 2015 08:35:12 GMT
  Hi everybody,


A couple of days ago I started refactoring one of our applications to use CXF / JAX-RS. Until
then the entry point of the application was an implementation of javax.servlet.http.HttpServlet
that was deployed to tomcat extracting all information needed using the doPost and doGet methods
and the HttpServletRequest / HttpServletResponse parameters directly.
Now I refactored that usind a CXFNonSpringServlet and moving the implementation to a service
class with 2 methods annotated with @POST / @GET and, again, 2 parameters HttpServletRequest
/ HttpServletResponse with the help of the @Context annotation.
Everything went smooth, so I started doing some regression tests and noticed a different behaviour
of the new implementation compared to the new one: I send a POST request with Content-Type
application/x-www-form-urlencoded and defining some parameters in the body of the request
instead of passing them directly as parameters in the URL. The "old" implementation will get
all parameters defined in the body by calling (Http)ServletRequest.getParameter(String) but
the new one will not. Actually, it looks like no parameters were defined at all.
I really would like to void to read the body and parse it to extract the parameters defined
in there. Is there a logic explanation for that behaviour? Do I need to define an Interceptor
or something similar?
Any help/clarification would be appreciated.


Best regards,
Julien

Avitech GmbH
Engineering AxL
Tel.: +49 (0)7541/282-177
Fax: +49 (0)7541/282-199
e-mail: julien.charon@avitech.aero<mailto:julien.charon@avitech.aero>
________________________________________________
Avitech GmbH
Principal Office: Bahnhofplatz 1 | 88045 Friedrichshafen | Germany
Court Registration: Amtsgericht Ulm | HRB 728293
Geschäftsführer/Managing Director: Antonio Maria Gonzalez Gorostiza
http://avitech.aero<http://avitech.aero/>

This message may contain confidential information and is intended only for the individual
named. If you are not the named addressee you should not disseminate, distribute or copy this
e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message