Examples of createXMLStreamWriter()


Examples of org.apache.cxf.aegis.AegisContext.createXMLStreamWriter()

        if (genericType == null) {
            genericType = type;
        }
        AegisContext context = getAegisContext(type, genericType);
        AegisType aegisType = context.getTypeMapping().getType(genericType);
        AegisWriter<XMLStreamWriter> aegisWriter = context.createXMLStreamWriter();
        try {
            String enc = HttpUtils.getSetEncoding(m, headers, "UTF-8");
            XMLStreamWriter xmlStreamWriter = createStreamWriter(aegisType.getSchemaType(), enc, os);
            // use type qname as element qname?
            xmlStreamWriter.writeStartDocument();
View Full Code Here

Examples of org.apache.cxf.aegis.AegisContext.createXMLStreamWriter()

   
    public void writeTo(Object obj, Class<?> type, Type genericType, Annotation[] anns, 
        MediaType m, MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException {
        AegisContext context = getAegisContext(type, genericType);
        AegisWriter<XMLStreamWriter> aegisWriter = context.createXMLStreamWriter();
        XMLStreamWriter xmlStreamWriter = StaxUtils.createXMLStreamWriter(os);
        try {
            aegisWriter.write(obj, null, false, xmlStreamWriter, null);
           
        } catch (Exception e) {
View Full Code Here

Examples of org.codehaus.jettison.badgerfish.BadgerFishXMLOutputFactory.createXMLStreamWriter()

    private JSONUtils() {
    }
   
    public static XMLStreamWriter createBadgerFishWriter(OutputStream os) throws XMLStreamException {
        XMLOutputFactory factory = new BadgerFishXMLOutputFactory();
        return factory.createXMLStreamWriter(os);
    }
   
    public static XMLStreamReader createBadgerFishReader(InputStream is) throws XMLStreamException {
        XMLInputFactory factory = new BadgerFishXMLInputFactory();
        return factory.createXMLStreamReader(is);
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedXMLOutputFactory.createXMLStreamWriter()

        try {

            // Set up the JSON StAX implementation
            Map<String, String> nstojns = new HashMap<String, String>();
            XMLOutputFactory factory = new MappedXMLOutputFactory(nstojns);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);
            xsw.writeStartDocument();
            if (obj != null) {

                XmlObject xObj = obj;
                XMLBeanStreamSerializer ser = new XMLBeanStreamSerializer();
View Full Code Here

Examples of org.codehaus.jettison.mapped.MappedXMLOutputFactory.createXMLStreamWriter()

                genericType = actualClass;
            }
            Marshaller ms = createMarshaller(actualObject, actualClass, genericType, m);

            XMLOutputFactory factory = new MappedXMLOutputFactory(namespaceMap);
            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);           
            ms.marshal(actualObject, xsw);
            xsw.close();
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);
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.