Thank you. So I will wait for 3.0.8. However, I noticed another behaviour related to using HttpServletRequest but with content type text/xml. If javax.servlet.ServletRequest.getInputStream() is called, an InputStream is returned that contains no data, i.e. I can't access the body of the POST request. Anything else I can do to avoid that than getting the body as method parameter?
Best regards, Julien Avitech GmbH Engineering AxL Tel.: +49 (0)7541/282-177 Fax: +49 (0)7541/282-199 e-mail: julien.cha...@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 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. -----Ursprüngliche Nachricht----- Von: Sergey Beryozkin [mailto:sberyoz...@gmail.com] Gesendet: Sonntag, 6. Dezember 2015 18:47 An: users@cxf.apache.org Betreff: Re: CXF 3.0.7 JAXRS POST application/x-www-form-urlencoded 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: julien.cha...@avitech.aero<mailto:julien.cha...@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. >> >> > > -- Sergey Beryozkin Talend Community Coders http://coders.talend.com/