Questo contenuto non è disponibile nella lingua selezionata.
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 marshall your entity objects. As with MultipartInput, your marshalling 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.