4.2.1. Motivation

There is set of providers embedded in eXo JAX-RS implementation.

Implementations of MessageBodyReader and MessageBodyWriters are taking care about serialization/deserialization of message body (HTTP request/response's body).

The next set of media and Java types processed automatically, thanks to embedded Readers (Writers).

Media TypeJava Type
*/*byte[]
*/*javax.activation.DataSource
*/*java.io.File
*/*java.io.InputStream
*/*java.io.Reader
*/*java.lang.String
*/*javax.ws.rs.core.StreamingOutput (Writer ONLY)
application/json1. Object with simple constructor + get/set methods; 2. Java Collection (java.uitl.List<T>, java.uitl.Set<T>, java.util.Map<String, T>, etc) where T as described in 1.
application/x-www-form-urlencodedjavax.ws.rs.core.MultivaluedMap<String, String>
multipart/*java.util.Iterator<org.apache.commons.fileupload.FileItem>
application/xml, application/xhtml+xml, text/xmljavax.xml.bind.JAXBElement
application/xml, application/xhtml+xml, text/xmlObject with JAXB annotations
application/xml, application/xhtml+xml, text/xmljavax.xml.transform.stream.StreamSource
application/xml, application/xhtml+xml, text/xmljavax.xml.transform.sax.SAXSource
application/xml, application/xhtml+xml, text/xmljavax.xml.transform.dom.DOMSource

In some case it may be required to use alternative provider for the same media and java type but such changes must not impact to any other services.

Copyright ©2012. All rights reserved. eXo Platform SAS