1 55 56 package org.jboss.axis.encoding.ser; 57 58 import org.jboss.axis.attachments.MimeMultipartDataSource; 59 import org.jboss.axis.encoding.SerializationContext; 60 import org.jboss.logging.Logger; 61 import org.xml.sax.Attributes ; 62 63 import javax.activation.DataHandler ; 64 import javax.mail.internet.MimeMultipart ; 65 import javax.xml.namespace.QName ; 66 import java.io.IOException ; 67 68 73 public class MimeMultipartDataHandlerSerializer extends JAFDataHandlerSerializer 74 { 75 76 private static Logger log = Logger.getLogger(MimeMultipartDataHandlerSerializer.class.getName()); 77 78 81 public void serialize(QName name, Attributes attributes, 82 Object value, SerializationContext context) 83 throws IOException 84 { 85 if (value != null) 86 { 87 DataHandler dh = new DataHandler (new MimeMultipartDataSource("Multipart", (MimeMultipart )value)); 88 super.serialize(name, attributes, dh, context); 89 } 90 } } | Popular Tags |