uCosminexus Application Server, Web Service Development Guide

[Contents][Glossary][Index][Back][Next]

24.3.4 Annotation for declaring the media type

This subsection describes the annotations for declaring the media types, supported by the JAX-RS engine.

Organization of this subsection
(1) javax.ws.rs.Consumes annotation
(2) javax.ws.rs.Produces annotation

(1) javax.ws.rs.Consumes annotation

The javax.ws.rs.Consumes annotation specifies a list of MIME media types supported by a Web resource in an HTTP request. You can use the javax.ws.rs.Consumes annotation in:

The javax.ws.rs.Consumes annotation is ignored if used in the exception mapping provider.

(2) javax.ws.rs.Produces annotation

The javax.ws.rs.Produces annotation specifies a list of MIME media types supported by a Web resource in an HTTP response. You can use the javax.ws.rs.Produces annotation in:

The javax.ws.rs.Produces annotation is ignored if used in the exception mapping provider.