Package org.apache.cxf.aegis.xml.jdom

Examples of org.apache.cxf.aegis.xml.jdom.JDOMWriter


        ByteBean bean = new ByteBean();

        // Test writing
        Element element = new Element("root", "b", "urn:Bean");
        new Document(element);
        type.writeObject(bean, new JDOMWriter(element), getContext());

        // Make sure the date doesn't have an element. Its non nillable so it
        // just
        // shouldn't be there.
View Full Code Here


        Context messageContext = new Context(context);
        Element element = new Element("root", "b", "urn:Bean");
        new Document(element);
        AttributeBean bean = new AttributeBean();
        type.writeObject(bean, new JDOMWriter(element), messageContext);
        assertValid("/b:root[@xyzzy:attrExplicitString]", element);
        assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
        assertValid("/b:root[@attrPlainString]", element);
        assertXPathEquals("/b:root/@attrPlainString", "attrPlain", element);
    }
View Full Code Here

        Context messageContext = new Context(context);
        Element element = new Element("root", "b", "urn:Bean");
        new Document(element);
        AttributeBean bean = new AttributeBean();
        type.writeObject(bean, new JDOMWriter(element), messageContext);
        assertValid("/b:root[@xyzzy:attrExplicitString]", element);
        assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
        assertValid("/b:root[@pkg:attrPlainString]", element);
        assertXPathEquals("/b:root/@pkg:attrPlainString", "attrPlain", element);
    }
View Full Code Here

        Context messageContext = new Context(context);
        Element element = new Element("root", "b", "urn:Bean");
        new Document(element);
        XmlMappedAttributeBean bean = new XmlMappedAttributeBean();
        type.writeObject(bean, new JDOMWriter(element), messageContext);
        assertValid("/b:root[@attrXmlString]", element);
        assertXPathEquals("/b:root/@attrXmlString", "attrXml", element);
    }
View Full Code Here

        Context messageContext = new Context(context);
        Element element = new Element("root", "b", "urn:Bean");
        new Document(element);
        XmlMappedAttributeBean bean = new XmlMappedAttributeBean();
        type.writeObject(bean, new JDOMWriter(element), messageContext);
        assertValid("/b:root[@pkg:attrXmlString]", element);
        assertXPathEquals("/b:root/@pkg:attrXmlString", "attrXml", element);
    }
View Full Code Here

        type.setSchemaType(new QName("urn:test", "test"));

        tm.register(type);

        Element root = new Element("root");
        JDOMWriter writer = new JDOMWriter(root);

        type.writeObject(smallEnum.VALUE1, writer, getContext());

        assertEquals("VALUE1", root.getValue());
View Full Code Here

        Type type = tm.getTypeCreator().createType(EnumBean.class);

        tm.register(type);

        Element root = new Element("root");
        JDOMWriter writer = new JDOMWriter(root);

        type.writeObject(new EnumBean(), writer, getContext());

        JDOMReader reader = new JDOMReader(root);
        Object value = type.readObject(reader, getContext());
View Full Code Here

        type.setSchemaType(new QName("urn:test", "test"));

        tm.register(type);

        Element root = new Element("root");
        JDOMWriter writer = new JDOMWriter(root);

        type.writeObject(smallEnum.VALUE1, writer, new Context());

        assertEquals("VALUE1", root.getValue());
View Full Code Here

        Type type = tm.getTypeCreator().createType(EnumBean.class);

        tm.register(type);

        Element root = new Element("root");
        JDOMWriter writer = new JDOMWriter(root);

        type.writeObject(new EnumBean(), writer, new Context());

        JDOMReader reader = new JDOMReader(root);
        Object value = type.readObject(reader, new Context());
View Full Code Here

TOP

Related Classes of org.apache.cxf.aegis.xml.jdom.JDOMWriter

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.