FYI:
https://issues.apache.org/jira/browse/CXF-6679
Sergey
On 04/12/15 11:59, Sergey Beryozkin wrote:
Hi
Thanks for experimenting with CXF,
https://issues.apache.org/jira/browse/CXF-6679
is open and I'm honestly not sure why it is not working because CXF
itself does not consume that data, so if it works directly with the
servlet then it should work inside the JAX-RS code.
Unless CXF does some internal caching before the stream even consumed by
the application, hmm, need to check that...
That said, I;d recommend avoiding using HttpServletRequest and simply
have MultivaluedMap in the method signature or @FormParams if a number
of parameters is not open ended.
I'll look at CXF-6679 asap
Sergey
On 04/12/15 08:35, Julien Charon wrote:
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: [email protected]<mailto:[email protected]>
________________________________________________
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.
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/