Package org.apache.tuscany.sca.databinding.jaxb

Examples of org.apache.tuscany.sca.databinding.jaxb.JAXB2Node


        TransformationContext tContext1 = createMock(TransformationContext.class);
        expect(tContext1.getSourceDataType()).andReturn(sourceDataType).anyTimes();
        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        Node node = t1.transform(object1, tContext1);

        Assert.assertNotNull(node);

        Node2JAXB t2 = new Node2JAXB();
        Object object2 = t2.transform(node, tContext);
View Full Code Here


        TransformationContext tContext1 = createMock(TransformationContext.class);
        expect(tContext1.getSourceDataType()).andReturn(sourceDataType).anyTimes();
        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        Node node = t1.transform(object1, tContext1);

        Assert.assertNotNull(node);

        Node2JAXB t2 = new Node2JAXB();
        Object object2 = t2.transform(node, tContext);
View Full Code Here

        TransformationContext tContext1 = createMock(TransformationContext.class);
        expect(tContext1.getSourceDataType()).andReturn(sourceDataType).anyTimes();
        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        PurchaseOrderType po = new ObjectFactory().createPurchaseOrderType();
        Node node = t1.transform(po, tContext1);

        Assert.assertNotNull(node);

    }
View Full Code Here

        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        expect(tContext1.getSourceOperation()).andReturn(null).anyTimes();
        expect(tContext1.getTargetOperation()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        Node node = t1.transform(object1, tContext1);

        Assert.assertNotNull(node);

        Node2JAXB t2 = new Node2JAXB();
        Object object2 = t2.transform(node, tContext);
View Full Code Here

        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        expect(tContext1.getSourceOperation()).andReturn(null).anyTimes();
        expect(tContext1.getTargetOperation()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        Node node = t1.transform(object1, tContext1);

        Assert.assertNotNull(node);

        Node2JAXB t2 = new Node2JAXB();
        Object object2 = t2.transform(node, tContext);
View Full Code Here

        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        expect(tContext1.getSourceOperation()).andReturn(null).anyTimes();
        expect(tContext1.getTargetOperation()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        PurchaseOrderType po = new ObjectFactory().createPurchaseOrderType();
        Node node = t1.transform(po, tContext1);

        Assert.assertNotNull(node);

    }
View Full Code Here

        // serializeAndConsume() will trigger the JAXBDataSource.serialize(Writer, OMOutputFormat)
        om.serializeAndConsume(sw);
        System.out.println(sw.toString());

        start = System.currentTimeMillis();
        Node node = new JAXB2Node(new DefaultExtensionPointRegistry()).transform(po, tContext);
        XMLStreamReader reader = new Node2XMLStreamReader().transform(node, null);
        om = new StAXOMBuilder(reader).getDocumentElement();
        sw = new StringWriter();
        om.serializeAndConsume(sw);
        long duration2 = System.currentTimeMillis() - start;
View Full Code Here

    public void start(ExtensionPointRegistry registry) {
        DataBindingExtensionPoint dataBindings = registry.getExtensionPoint(DataBindingExtensionPoint.class);
        dataBindings.addDataBinding(new JAXBDataBinding());

        TransformerExtensionPoint transformers = registry.getExtensionPoint(TransformerExtensionPoint.class);
        transformers.addTransformer(new JAXB2Node());
        transformers.addTransformer(new Node2JAXB());
        transformers.addTransformer(new Reader2JAXB());
        transformers.addTransformer(new XMLStreamReader2JAXB());

        JavaInterfaceIntrospectorExtensionPoint introspectors = registry.getExtensionPoint(JavaInterfaceIntrospectorExtensionPoint.class);
View Full Code Here

        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        expect(tContext1.getSourceOperation()).andReturn(null).anyTimes();
        expect(tContext1.getTargetOperation()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        Node node = t1.transform(object1, tContext1);

        Assert.assertNotNull(node);

        Node2JAXB t2 = new Node2JAXB();
        Object object2 = t2.transform(node, tContext);
View Full Code Here

        expect(tContext1.getTargetDataType()).andReturn(null).anyTimes();
        expect(tContext1.getSourceOperation()).andReturn(null).anyTimes();
        expect(tContext1.getTargetOperation()).andReturn(null).anyTimes();
        replay(tContext1);

        JAXB2Node t1 = new JAXB2Node();
        Node node = t1.transform(object1, tContext1);

        Assert.assertNotNull(node);

        Node2JAXB t2 = new Node2JAXB();
        Object object2 = t2.transform(node, tContext);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.databinding.jaxb.JAXB2Node

Copyright © 2018 www.massapicom. 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.