當前位置: 首頁>>代碼示例>>Java>>正文


Java ArrayDeserializerFactory類代碼示例

本文整理匯總了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));
	
	
}
 
開發者ID:lucee,項目名稱:Lucee4,代碼行數:24,代碼來源:TypeMappingUtil.java

示例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);
    }
 
開發者ID:apache,項目名稱:tomee,代碼行數:13,代碼來源:ArrayTypeInfo.java

示例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);
}
 
開發者ID:apache,項目名稱:tomee,代碼行數:49,代碼來源:JavaServiceDescBuilder.java


注:本文中的org.apache.axis.encoding.ser.ArrayDeserializerFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。