本文整理汇总了Java中org.apache.axis.encoding.ser.ArrayDeserializerFactory类的典型用法代码示例。如果您正苦于以下问题:Java ArrayDeserializerFactory类的具体用法?Java ArrayDeserializerFactory怎么用?Java ArrayDeserializerFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ArrayDeserializerFactory类属于org.apache.axis.encoding.ser包,在下文中一共展示了ArrayDeserializerFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerBeanTypeMapping
import org.apache.axis.encoding.ser.ArrayDeserializerFactory; //导入依赖的package包/类
public static void registerBeanTypeMapping(javax.xml.rpc.encoding.TypeMapping tm, Class clazz, QName qName) {
if(tm.isRegistered(clazz, qName)) return;
if(clazz.isArray()) {
QName ct=AxisCaster.toComponentType(qName,null);
if(ct!=null) {
tm.register(
clazz,
qName,
new ArraySerializerFactory(clazz, ct),
new ArrayDeserializerFactory(ct));
return;
}
}
tm.register(
clazz,
qName,
new BeanSerializerFactory(clazz, qName),
new BeanDeserializerFactory(clazz, qName));
}
示例2: register
import org.apache.axis.encoding.ser.ArrayDeserializerFactory; //导入依赖的package包/类
public void register(TypeMapping typeMapping) {
// SerializerFactory ser = BaseSerializerFactory.createFactory(getSerFactoryClass(), getClazz(), getqName());
// ((ArraySerializerFactory)ser).setComponentType(componentType);
// ((ArraySerializerFactory)ser).setComponentQName(componentQName);
// DeserializerFactory deser = BaseDeserializerFactory.createFactory(getDeserFactoryClass(), getClazz(), getqName());
// ((ArrayDeserializerFactory)deser).setComponentType(componentType);
ArraySerializerFactory ser = new ArraySerializerFactory(componentType, componentQName);
ArrayDeserializerFactory deser = new ArrayDeserializerFactory();
typeMapping.register(getClazz(), getqName(), ser, deser);
}
示例3: registerType
import org.apache.axis.encoding.ser.ArrayDeserializerFactory; //导入依赖的package包/类
private void registerType(JaxRpcTypeInfo type, TypeMapping typeMapping) throws OpenEJBException {
Class javaType;
try {
javaType = classLoader.loadClass(type.javaType);
} catch (ClassNotFoundException e) {
throw new OpenEJBException("Could not load class for JaxRpc mapping " + type.javaType);
}
// Default uses the generic Java Beans serializer/deserializer
Class serializerFactoryClass = BeanSerializerFactory.class;
Class deserializerFactoryClass = BeanDeserializerFactory.class;
switch (type.serializerType) {
case ARRAY:
serializerFactoryClass = ArraySerializerFactory.class;
deserializerFactoryClass = ArrayDeserializerFactory.class;
break;
case ENUM:
serializerFactoryClass = EnumSerializerFactory.class;
deserializerFactoryClass = EnumDeserializerFactory.class;
break;
case LIST:
serializerFactoryClass = SimpleListSerializerFactory.class;
deserializerFactoryClass = SimpleListDeserializerFactory.class;
break;
default:
if (type.simpleBaseType != null) {
Class clazz = SOAP_TYPE_MAPPING.getClassForQName(type.simpleBaseType, null, null);
if (null != clazz) {
// Built in SOAP type
serializerFactoryClass = SOAP_TYPE_MAPPING.getSerializer(clazz, type.simpleBaseType).getClass();
deserializerFactoryClass = SOAP_TYPE_MAPPING.getDeserializer(clazz, type.simpleBaseType, null).getClass();
} else {
clazz = JAXRPC_TYPE_MAPPING.getClassForQName(type.simpleBaseType, null, null);
if (null != clazz) {
// Built in XML schema type
serializerFactoryClass = JAXRPC_TYPE_MAPPING.getSerializer(clazz, type.simpleBaseType).getClass();
deserializerFactoryClass = JAXRPC_TYPE_MAPPING.getDeserializer(clazz, type.simpleBaseType, null).getClass();
}
}
}
break;
}
SerializerFactory serializerFactory = BaseSerializerFactory.createFactory(serializerFactoryClass, javaType, type.qname);
DeserializerFactory deserializerFactory = BaseDeserializerFactory.createFactory(deserializerFactoryClass, javaType, type.qname);
typeMapping.register(javaType, type.qname, serializerFactory, deserializerFactory);
}