Not sure if this answers your question, but here: https://github.com/gmazza/jersey-samples-on-cxf/blob/master/simple-servlet/src/main/java/com/sun/jersey/samples/servlet/resources/ResourceBean3.java#L130 (line 130-160) shows ways to work with MultivaluedMap within a REST resource (at least with a @GET). A custom MessageBodyReader/Writer wasn't needed in that case.

This was for the "simple-servlet" example listed here: http://www.jroller.com/gmazza/entry/jersey_samples_on_cxf

HTH,
Glen

On 06/13/2012 03:58 PM, Penmatsa, Vinay wrote:
 From documentation in 
http://cxf.apache.org/docs/jax-rs-basics.html#JAX-RSBasics-MessageBodyProviders:

"By default, CXF supports String, byte[], InputStream, Reader, File, JAXP 
Source, JAX-RS StreamingOutput, JAXB-annotated types with application/xml, text/xml 
and application/json formats as well as JAXBElement (see below). JAX-RS 
MultivaluedMap is also supported for form contents.
See also the "Support for data bindings" section below."

I couldn't find a MessageBodyReader/Writer implementation for MultivaluedMap in 
CXF. How could I use this type?
In general, if I want to use a Map<String,String>  in a REST POST, should I 
write readers/writers for the Map type or does CXF provide anything by default?

Thanks,
Vinay



--
Glen Mazza
Talend Community Coders
coders.talend.com
blog: www.jroller.com/gmazza

Reply via email to