Este contenido no está disponible en el idioma seleccionado.
20.6. Output with multipart
RESTEasy provides a simple API to output multipart data.
To output
multipart
data, create a MultipartOutput
object and call addPart()
methods. RESTEasy automatically finds a MessageBodyWriter
to marshal your entity objects. As with MultipartInput
, your marshaling may be sensitive to generic type metadata. In this case, use GenericType
. The following example returns a multipart/mixed
format to the calling client. The parts are JAXB-annotated Customer
objects that will marshal into application/xml
.