Package org.apache.cxf.aegis

Examples of org.apache.cxf.aegis.Context


            throw new RuntimeException(e);
        }
    }

    public Object readRef(ElementReader root) throws XMLStreamException {
        Context context = getContext();

        // get Type based on the element qname
        MessageReader reader = root.getNextElementReader();
        Type type = this.mapping.getType(reader.getName());
        assertNotNull("type is null", type);
View Full Code Here


        TypeMapping mapping = context.getTypeMapping();
       
        Type type = mapping.getTypeCreator().createType(AttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        AttributeBean bean = new AttributeBean();
        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@xyzzy:attrExplicitString]", element);
        assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
        assertValid("/b:root[@attrPlainString]", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        Type type = mapping.getTypeCreator().createType(AttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        AttributeBean bean = new AttributeBean();
        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@xyzzy:attrExplicitString]", element);
        assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
        assertValid("/b:root[@pkg:attrPlainString]", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        Type type = mapping.getTypeCreator().createType(XmlMappedAttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        XmlMappedAttributeBean bean = new XmlMappedAttributeBean();
       
        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@attrXmlString]", element);
        assertXPathEquals("/b:root/@attrXmlString", "attrXml", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        Type type = mapping.getTypeCreator().createType(XmlMappedAttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        XmlMappedAttributeBean bean = new XmlMappedAttributeBean();

        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@pkg:attrXmlString]", element);
        assertXPathEquals("/b:root/@pkg:attrXmlString", "attrXml", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        AegisType type = mapping.getTypeCreator().createType(AttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        AttributeBean bean = new AttributeBean();
        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@xyzzy:attrExplicitString]", element);
        assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
        assertValid("/b:root[@attrPlainString]", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        AegisType type = mapping.getTypeCreator().createType(AttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        AttributeBean bean = new AttributeBean();
        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@xyzzy:attrExplicitString]", element);
        assertXPathEquals("/b:root/@xyzzy:attrExplicitString", "attrExplicit", element);
        assertValid("/b:root[@pkg:attrPlainString]", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        AegisType type = mapping.getTypeCreator().createType(XmlMappedAttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        XmlMappedAttributeBean bean = new XmlMappedAttributeBean();
       
        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@attrXmlString]", element);
        assertXPathEquals("/b:root/@attrXmlString", "attrXml", element);
View Full Code Here

        TypeMapping mapping = context.getTypeMapping();
       
        AegisType type = mapping.getTypeCreator().createType(XmlMappedAttributeBean.class);
        type.setSchemaType(new QName("urn:Bean", "bean"));

        Context messageContext = new Context(context);
        XmlMappedAttributeBean bean = new XmlMappedAttributeBean();

        Element element = writeObjectToElement(type, bean, messageContext);
        assertValid("/b:root[@pkg:attrXmlString]", element);
        assertXPathEquals("/b:root/@pkg:attrXmlString", "attrXml", element);
View Full Code Here

        if (type == null) {
            throw new Fault(new Message("NO_MESSAGE_FOR_PART", LOG));
        }


        Context context = new Context(databinding.getAegisContext());

        context.setAttachments(attachments);
        type = TypeUtil.getWriteType(databinding.getAegisContext(), obj, type);
        try {
            W3CDOMStreamWriter domWriter = new W3CDOMStreamWriter(output);
            ElementWriter writer = new ElementWriter(domWriter);
            MessageWriter w2 = writer.getElementWriter(part.getConcreteName());
View Full Code Here

TOP

Related Classes of org.apache.cxf.aegis.Context

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.