MultivaluedMap<String, Object> httpHeaders,
OutputStream outputStream) throws IOException
{
try
{
Marshaller marshaller = getMarshaller(type, annotations, mediaType);
marshaller = decorateMarshaller(type, annotations, mediaType, marshaller);
marshaller.marshal(t, outputStream);
}
catch (JAXBException e)
{
Response response = Response.serverError().build();
throw new WebApplicationException(e, response);