1 10 11 package org.mule.transformers.xml.wire; 12 13 import org.mule.transformers.wire.TransformerPairWireFormat; 14 import org.mule.transformers.xml.XStreamFactory; 15 import org.mule.transformers.xml.ObjectToXml; 16 import org.mule.transformers.xml.XmlToObject; 17 18 import java.util.List ; 19 import java.util.Map ; 20 21 26 public class XStreamWireFormat extends TransformerPairWireFormat 27 { 28 public XStreamWireFormat() throws IllegalAccessException , InstantiationException , ClassNotFoundException 29 { 30 this(XStreamFactory.XSTREAM_XPP_DRIVER, null, null); 31 } 32 33 public XStreamWireFormat(String driverClassName, Map aliases, List converters) 34 throws IllegalAccessException , InstantiationException , ClassNotFoundException 35 { 36 XmlToObject in = new XmlToObject(); 37 in.setDriverClassName(driverClassName); 38 in.setAliases(aliases); 39 in.setConverters(converters); 40 setInboundTransformer(in); 41 42 ObjectToXml out = new ObjectToXml(); 43 out.setDriverClassName(driverClassName); 44 out.setAliases(aliases); 45 out.setConverters(converters); 46 setOutboundTransformer(out); 47 } 48 49 } 50 | Popular Tags |