Thanks Sergey, I will try this. Regards, Anthony
-----Original Message----- From: Sergey Beryozkin [mailto:[email protected]] Sent: mardi 9 avril 2013 14:39 To: [email protected] Subject: Re: How to use "_ctype" in a RESTful webservice Hi Anthony On 09/04/13 12:29, Muller, Anthony wrote: > Hello, > > I have an RESTful webservice based on CXF. > > Some calls have a specific content type, like application/pdf. > > To support some clients which cannot modify http header, I wish to use the > "_ctype" query parameter to provide the requested content type... > > But it seems to not work... (cxf 2.3.8) : "Unsupported media type." > > Can you help ? > I believe that in CXF 2.3.8 one would need to work with a custom CXF interceptor, registered in front of JAXRSInInterceptor, which would check Message.QUERY_STRING, and if it has a _ctype query parameter in it then it would set its value as a Message.CONTENT_TYPE property on the current message - a bit more work but this should do it HTH, Sergey > Anthony >
