Examples of createWriter()


Examples of org.apache.cxf.databinding.DataBinding.createWriter()

                        }
                    }
                    if (b != null) {
                        MessagePartInfo part = new MessagePartInfo(header.getName(), null);
                        part.setConcreteName(header.getName());
                        b.createWriter(XMLStreamWriter.class)
                            .write(header.getObject(), part, writer);
                    } else {
                        Element node = (Element)header.getObject();
                        StaxUtils.copy(node, writer);
                    }
View Full Code Here

Examples of org.apache.cxf.databinding.DataBinding.createWriter()

            MessagePartInfo part = fi.getMessageParts().iterator().next();
            DataBinding db = service.getDataBinding();

            try {
                if (isDOMSupported(db)) {
                    DataWriter<Node> writer = db.createWriter(Node.class);

                    if (f.hasDetails()) {
                        writer.write(bean, part, f.getDetail());
                    } else {
                        writer.write(bean, part, f.getOrCreateDetail());
View Full Code Here

Examples of org.apache.cxf.databinding.DataBinding.createWriter()

                        }
                    }
                } else {
                    if (f.hasDetails()) {
                        XMLStreamWriter xsw = new W3CDOMStreamWriter(f.getDetail());
                        DataWriter<XMLStreamWriter> writer = db.createWriter(XMLStreamWriter.class);
                        writer.write(bean, part, xsw);
                    } else {
                        XMLStreamWriter xsw = new W3CDOMStreamWriter(f.getOrCreateDetail());
                        DataWriter<XMLStreamWriter> writer = db.createWriter(XMLStreamWriter.class);
                        writer.write(bean, part, xsw);
View Full Code Here

Examples of org.apache.cxf.databinding.DataBinding.createWriter()

                        XMLStreamWriter xsw = new W3CDOMStreamWriter(f.getDetail());
                        DataWriter<XMLStreamWriter> writer = db.createWriter(XMLStreamWriter.class);
                        writer.write(bean, part, xsw);
                    } else {
                        XMLStreamWriter xsw = new W3CDOMStreamWriter(f.getOrCreateDetail());
                        DataWriter<XMLStreamWriter> writer = db.createWriter(XMLStreamWriter.class);
                        writer.write(bean, part, xsw);
                        if (!f.getDetail().hasChildNodes()) {
                            f.setDetail(null);
                        }
                    }
View Full Code Here

Examples of org.apache.cxf.databinding.DataBinding.createWriter()

                        }
                    }
                    if (b != null) {
                        MessagePartInfo part = new MessagePartInfo(header.getName(), null);
                        part.setConcreteName(header.getName());
                        b.createWriter(XMLStreamWriter.class)
                            .write(header.getObject(), part, writer);
                    } else {
                        Element node = (Element)header.getObject();
                        StaxUtils.copy(node, writer);
                    }
View Full Code Here

Examples of org.apache.cxf.databinding.DataBinding.createWriter()

                        }
                    }
                    if (b != null) {
                        MessagePartInfo part = new MessagePartInfo(header.getName(), null);
                        part.setConcreteName(header.getName());
                        b.createWriter(XMLStreamWriter.class)
                            .write(header.getObject(), part, writer);
                    } else {
                        Element node = (Element)header.getObject();
                        StaxUtils.copy(node, writer);
                    }
View Full Code Here

Examples of org.apache.cxf.databinding.DataBinding.createWriter()

            MessagePartInfo part = fi.getMessageParts().iterator().next();
            DataBinding db = service.getDataBinding();

            try {
                if (isDOMSupported(db)) {
                    DataWriter<Node> writer = db.createWriter(Node.class);

                    if (f.hasDetails()) {
                        writer.write(bean, part, f.getDetail());
                    } else {
                        writer.write(bean, part, f.getOrCreateDetail());
View Full Code Here

Examples of org.apache.cxf.databinding.DataWriterFactory.createWriter()

        DataWriterFactory factory = service.getDataBinding().getDataWriterFactory();

        DataWriter<XMLStreamWriter> dataWriter = null;
        for (Class<?> cls : factory.getSupportedFormats()) {
            if (cls == XMLStreamWriter.class) {
                dataWriter = factory.createWriter(XMLStreamWriter.class);
                break;
            }
        }

        if (dataWriter == null) {
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataBinding.createWriter()

   
    @Test
    public void testSetProperty() throws Exception {
        JAXBDataBinding db = getTestWriterFactory();
              
        DataWriterImpl<XMLStreamWriter> dw = (DataWriterImpl<XMLStreamWriter>)db.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);
       
        // Build message to set custom event handler
        org.apache.cxf.message.Message message = new org.apache.cxf.message.MessageImpl();
        message.put("jaxb-writer-validation-event-handler", new MyCustomHandler());
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataBinding.createWriter()

    @Test
    public void testWriteRPCLit1() throws Exception {
        JAXBDataBinding db = getTestWriterFactory();
       
        DataWriter<XMLStreamWriter> dw = db.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);
       
        String val = new String("TESTOUTPUTMESSAGE");
        QName elName = new QName("http://apache.org/hello_world_rpclit/types",
                                 "in");
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.