MultivaluedMap<String, Object> httpHeaders,
OutputStream entityStream) throws IOException, WebApplicationException {
try {
ObjectFactory objectFactory = new ObjectFactory();
JAXBElement<AppService> sd = objectFactory.createService(t);
Marshaller marshaller = AppService.getMarshaller();
marshaller.setProperty(Marshaller.JAXB_ENCODING, ProviderUtils.getCharset(mediaType));
AtomJAXBUtils.marshal(marshaller, sd, entityStream);
} catch (PropertyException e) {
throw new WebApplicationException(e);