1 16 17 package org.apache.axis.encoding.ser; 18 19 import org.apache.axis.attachments.PlainTextDataSource; 20 import org.apache.axis.components.logger.LogFactory; 21 import org.apache.axis.encoding.SerializationContext; 22 import org.apache.commons.logging.Log; 23 import org.xml.sax.Attributes ; 24 25 import javax.activation.DataHandler ; 26 import javax.xml.namespace.QName ; 27 import java.io.IOException ; 28 29 33 public class PlainTextDataHandlerSerializer extends JAFDataHandlerSerializer { 34 35 protected static Log log = 36 LogFactory.getLog(PlainTextDataHandlerSerializer.class.getName()); 37 38 41 public void serialize(QName name, Attributes attributes, 42 Object value, SerializationContext context) 43 throws IOException 44 { 45 DataHandler dh = new DataHandler ( 46 new PlainTextDataSource("source", (String ) value)); 47 super.serialize(name, attributes, dh, context); 48 } } | Popular Tags |