Supporting custom request-response message formats

The JAX-RS framework uses entity provider components for the marshalling and unmarshalling of the message body content (entity) present in the response and request objects, respectively. It is the entity provider component that maps an entity with the associated Java types.

The following table lists the default entity mappings provided by the JAX-RS runtime via a set of built-in entity providers. When you use one of the Internet media types present in the following table for representing the request or response entity body, the framework takes care of the conversion and reconversion of the entity body to the associated Java type:

Data types

Internet media type

byte[]

*/*

java.lang.String ...

Get RESTful Java Web Services - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.