Search in sources :

Example 6 with ElementWriter

use of org.apache.cxf.aegis.xml.stax.ElementWriter in project cxf by apache.

the class AbstractAegisTest method writeObjectToElement.

protected Element writeObjectToElement(AegisType type, Object bean, Context context) {
    Element element = createElement("urn:Bean", "root", "b");
    ElementWriter writer = getElementWriter(element, new MapNamespaceContext());
    type.writeObject(bean, writer, getContext());
    writer.close();
    return element;
}
Also used : Element(org.w3c.dom.Element) MapNamespaceContext(org.apache.cxf.helpers.MapNamespaceContext) ElementWriter(org.apache.cxf.aegis.xml.stax.ElementWriter)

Aggregations

ElementWriter (org.apache.cxf.aegis.xml.stax.ElementWriter)6 MessageWriter (org.apache.cxf.aegis.xml.MessageWriter)4 Context (org.apache.cxf.aegis.Context)3 AegisType (org.apache.cxf.aegis.type.AegisType)3 Message (org.apache.cxf.common.i18n.Message)3 Element (org.w3c.dom.Element)3 DatabindingException (org.apache.cxf.aegis.DatabindingException)2 MapNamespaceContext (org.apache.cxf.helpers.MapNamespaceContext)2 Fault (org.apache.cxf.interceptor.Fault)2 XmlSchemaElement (org.apache.ws.commons.schema.XmlSchemaElement)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 XmlElement (javax.xml.bind.annotation.XmlElement)1 QName (javax.xml.namespace.QName)1 AbstractAegisTest (org.apache.cxf.aegis.AbstractAegisTest)1 AegisContext (org.apache.cxf.aegis.AegisContext)1 SimpleBean (org.apache.cxf.aegis.services.SimpleBean)1 TypeCreator (org.apache.cxf.aegis.type.TypeCreator)1 ArrayType (org.apache.cxf.aegis.type.basic.ArrayType)1 ElementReader (org.apache.cxf.aegis.xml.stax.ElementReader)1