Examples of JAXBDataWriterFactory


Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory

    public void tearDown() throws Exception {
        baos.close();
    }

    public void testWriteRPCLit1() throws Exception {
        JAXBDataWriterFactory wf = getTestWriterFactory();
       
        DataWriter<XMLStreamWriter> dw = wf.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

Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory

        StaxUtils.toNextText(reader);
        assertEquals("TESTOUTPUTMESSAGE", reader.getText());
    }

    public void testWriteRPCLit2() throws Exception {
        JAXBDataWriterFactory wf = getTestWriterFactory(MyComplexStruct.class);
       
        DataWriter<XMLStreamWriter> dw = wf.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);
       
        MyComplexStruct val = new MyComplexStruct();
        val.setElem1("This is element 1");
        val.setElem2("This is element 2");
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory

        StaxUtils.toNextText(reader);
        assertEquals("This is element 1", reader.getText());
    }

    public void testWriteBare() throws Exception {
        JAXBDataWriterFactory wf = getTestWriterFactory(TradePriceData.class);
       
        DataWriter<XMLStreamWriter> dw = wf.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);
       
        TradePriceData val = new TradePriceData();
        val.setTickerSymbol("This is a symbol");
        val.setTickerPrice(1.0f);
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory

        StaxUtils.toNextText(reader);
        assertEquals("This is a symbol", reader.getText());
    }
   
    public void testWriteWrapper() throws Exception {
        JAXBDataWriterFactory wf = getTestWriterFactory(GreetMe.class);
       
        DataWriter<XMLStreamWriter> dw = wf.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);

        GreetMe val = new GreetMe();
        val.setRequestType("Hello");
       
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory

        StaxUtils.toNextText(reader);
        assertEquals("Hello", reader.getText());
    }

    public void testWriteWrapperReturn() throws Exception {
        JAXBDataWriterFactory wf = getTestWriterFactory(GreetMeResponse.class);
       
        DataWriter<XMLStreamWriter> dw = wf.createWriter(XMLStreamWriter.class);
        assertNotNull(dw);

        GreetMeResponse retVal = new GreetMeResponse();
        retVal.setResponseType("TESTOUTPUTMESSAGE");
       
View Full Code Here

Examples of org.apache.cxf.jaxb.JAXBDataWriterFactory

        assertEquals("TESTOUTPUTMESSAGE", reader.getText());
    }

    private JAXBDataWriterFactory getTestWriterFactory(Class... clz) throws Exception {
        JAXBContext ctx = JAXBContext.newInstance(clz);
        JAXBDataWriterFactory writerFactory = new JAXBDataWriterFactory();
        writerFactory.setJAXBContext(ctx);
        return writerFactory;
    }
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.