Search in sources :

Example 6 with AttachmentMarshaller

use of jakarta.xml.bind.attachment.AttachmentMarshaller in project jaxb-ri by eclipse-ee4j.

the class Bridge method marshal.

/**
 * @since 2.0.2
 */
public final void marshal(T object, ContentHandler contentHandler, AttachmentMarshaller am) throws JAXBException {
    Marshaller m = context.marshallerPool.take();
    m.setAttachmentMarshaller(am);
    marshal(m, object, contentHandler);
    m.setAttachmentMarshaller(null);
    context.marshallerPool.recycle(m);
}
Also used : Marshaller(jakarta.xml.bind.Marshaller) AttachmentMarshaller(jakarta.xml.bind.attachment.AttachmentMarshaller)

Example 7 with AttachmentMarshaller

use of jakarta.xml.bind.attachment.AttachmentMarshaller in project jaxb-ri by eclipse-ee4j.

the class Bridge method marshal.

/**
 * @since 2.0.2
 */
public void marshal(T object, OutputStream output, NamespaceContext nsContext, AttachmentMarshaller am) throws JAXBException {
    Marshaller m = context.marshallerPool.take();
    m.setAttachmentMarshaller(am);
    marshal(m, object, output, nsContext);
    m.setAttachmentMarshaller(null);
    context.marshallerPool.recycle(m);
}
Also used : Marshaller(jakarta.xml.bind.Marshaller) AttachmentMarshaller(jakarta.xml.bind.attachment.AttachmentMarshaller)

Example 8 with AttachmentMarshaller

use of jakarta.xml.bind.attachment.AttachmentMarshaller in project metro-jax-ws by eclipse-ee4j.

the class OldBridge method marshal.

public final void marshal(T object, XMLStreamWriter output, AttachmentMarshaller am) throws JAXBException {
    Marshaller m = context.marshallerPool.take();
    m.setAttachmentMarshaller(am);
    marshal(m, object, output);
    m.setAttachmentMarshaller(null);
    context.marshallerPool.recycle(m);
}
Also used : Marshaller(jakarta.xml.bind.Marshaller) AttachmentMarshaller(jakarta.xml.bind.attachment.AttachmentMarshaller)

Aggregations

Marshaller (jakarta.xml.bind.Marshaller)8 AttachmentMarshaller (jakarta.xml.bind.attachment.AttachmentMarshaller)8 JAXBException (jakarta.xml.bind.JAXBException)2 WebServiceException (jakarta.xml.ws.WebServiceException)2 OutputStream (java.io.OutputStream)2 MtomStreamWriter (org.jvnet.staxex.util.MtomStreamWriter)2