Package org.apache.cxf.jaxrs.provider

Examples of org.apache.cxf.jaxrs.provider.JAXBElementProvider.writeTo()


    public void writeTo(GenericHandler<Book> o, Class<?> c, Type t, Annotation[] anns, MediaType m,
                        MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException, WebApplicationException {
        JAXBElementProvider jaxb = new JAXBElementProvider();
        jaxb.writeTo(o.getEntity(), o.getEntity().getClass(), InjectionUtils.getActualType(t),
                     anns, m, headers, os);
    }


}
View Full Code Here


            return null;
        }
        JAXBElementProvider provider = (JAXBElementProvider)providerObject;
        W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
        m.setContent(XMLStreamWriter.class, writer);
        provider.writeTo(body, body.getClass(),
                         body.getClass(), new Annotation[]{},
                         MediaType.APPLICATION_XML_TYPE,
                         (MultivaluedMap)m.get(Message.PROTOCOL_HEADERS), null);
        return writer.getDocument();
    }
View Full Code Here

    public void writeTo(GenericHandler<Book> o, Class<?> c, Type t, Annotation[] anns, MediaType m,
                        MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException, WebApplicationException {
        JAXBElementProvider jaxb = new JAXBElementProvider();
        jaxb.writeTo(o.getEntity(), c, InjectionUtils.getActualType(t), anns, m, headers, os);
    }


}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.