There's really not anything you can do about this at the Resteasy/JAX-RS
level. Buffering responses can also be VERY BAD for performance so
Resteasy (and really JAX-RS) writes directly to the network output
stream when marshalling via Jackson.
Depending on what servlet container you are
The interface:
@POST
@ClientResponseType(entityType = JAXBModule.class)
@Path(/upload)
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_XML)
public Response upload(@MultipartForm FileUploadForm form);
The FileUploadForm class
public class