1 16 17 20 package org.apache.axis.encoding.ser; 21 22 import org.apache.axis.utils.JavaUtils; 23 24 import javax.xml.namespace.QName ; 25 import javax.xml.rpc.JAXRPCException ; 26 27 public class SimpleSerializerFactory extends BaseSerializerFactory { 28 29 private boolean isBasicType = false; 30 31 35 public SimpleSerializerFactory(Class javaType, QName xmlType) { 36 super(SimpleSerializer.class, xmlType, javaType); 37 this.isBasicType = JavaUtils.isBasic(javaType); 38 } 39 40 public javax.xml.rpc.encoding.Serializer getSerializerAs(String mechanismType) throws JAXRPCException { 41 if (this.isBasicType) { 42 return new SimpleSerializer(javaType, xmlType); 43 } else { 44 return super.getSerializerAs(mechanismType); 45 } 46 } 47 48 } 49 | Popular Tags |