Ejemplo n.º 1
0
 public void writeTo(XMLStreamWriter sw) throws XMLStreamException {
   try {
     // Get output stream and use JAXB UTF-8 writer
     OutputStream os = XMLStreamWriterUtil.getOutputStream(sw);
     if (os != null) {
       bridge.marshal(jaxbObject, os, sw.getNamespaceContext());
     } else {
       bridge.marshal(jaxbObject, sw);
     }
   } catch (JAXBException e) {
     throw new XMLStreamException2(e);
   }
 }
 public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException {
   try {
     AttachmentMarshallerImpl am = new AttachmentMarshallerImpl(attachmentSet);
     // Get output stream and use JAXB UTF-8 writer
     OutputStream os = XMLStreamWriterUtil.getOutputStream(sw);
     if (os != null) {
       bridge.marshal(jaxbObject, os, sw.getNamespaceContext(), am);
     } else {
       bridge.marshal(jaxbObject, sw, am);
     }
     am.cleanup();
   } catch (JAXBException e) {
     // bug 6449684, spec 4.3.4
     throw new WebServiceException(e);
   }
 }
Ejemplo n.º 3
0
 /*     */ public void writePayloadTo(XMLStreamWriter sw) throws XMLStreamException /*     */ {
   /*     */ try {
     /* 300 */ AttachmentMarshaller am =
         (sw instanceof MtomStreamWriter)
             ? ((MtomStreamWriter) sw).getAttachmentMarshaller()
             : new AttachmentMarshallerImpl(this.attachmentSet);
     /*     */
     /* 305 */ OutputStream os = XMLStreamWriterUtil.getOutputStream(sw);
     /* 306 */ if (os != null)
       /* 307 */ this.bridge.marshal(this.jaxbObject, os, sw.getNamespaceContext(), am);
     /*     */ else {
       /* 309 */ this.bridge.marshal(this.jaxbObject, sw, am);
       /*     */ }
     /*     */
     /*     */ }
   /*     */ catch (JAXBException e)
   /*     */ {
     /* 315 */ throw new WebServiceException(e);
     /*     */ }
   /*     */ }