1 16 17 package org.apache.axis.encoding.ser; 18 19 import org.apache.axis.components.logger.LogFactory; 20 import org.apache.axis.encoding.DeserializationContext; 21 import org.apache.commons.logging.Log; 22 import org.xml.sax.Attributes ; 23 import org.xml.sax.SAXException ; 24 25 import javax.activation.DataHandler ; 26 import java.io.IOException ; 27 28 32 public class PlainTextDataHandlerDeserializer extends JAFDataHandlerDeserializer { 33 protected static Log log = 34 LogFactory.getLog(PlainTextDataHandlerDeserializer.class.getName()); 35 36 public void startElement(String namespace, String localName, 37 String prefix, Attributes attributes, 38 DeserializationContext context) 39 throws SAXException { 40 41 super.startElement(namespace, localName, prefix, attributes, context); 42 43 if (getValue() instanceof DataHandler ) { 44 try { 45 DataHandler dh = (DataHandler ) getValue(); 46 setValue(dh.getContent()); 47 } 48 catch (IOException ioe) { 49 } 50 } 51 } } | Popular Tags |