Package org.apache.axis.encoding

Examples of org.apache.axis.encoding.SerializerFactory


        registerTypeMapping(javaType, xmlType, sfClass, dfClass, true);
    }
    public void registerTypeMapping(Class javaType, QName xmlType,
                                    Class sfClass, Class dfClass, boolean force){
        // Instantiate the factory using introspection.
        SerializerFactory   sf = BaseSerializerFactory.createFactory  (sfClass, javaType, xmlType);
        DeserializerFactory df = BaseDeserializerFactory.createFactory(dfClass, javaType, xmlType);
        if (sf != null || df != null) {
            registerTypeMapping(javaType, xmlType, sf, df, force);
        }
    }
View Full Code Here


                    qName.getLocalPart();
        }

        // look up the serializer in the TypeMappingRegistry
        Serializer ser = null;
        SerializerFactory factory = null;
        if (tm != null) {
            factory = (SerializerFactory)tm.getSerializer(type);
        } else {
            factory = (SerializerFactory)defaultTM.getSerializer(type);
        }

        // If no factory is found, use the BeanSerializerFactory
        // if applicable, otherwise issue errors and treat as an anyType
        if (factory == null) {
            if (isBeanCompatible(type, true)) {
                factory = new BeanSerializerFactory(type, qName);
            } else {
                return null; // Don't return an element name
            }
        }

        if (factory != null) {
            ser = (Serializer)factory.getSerializerAs(Constants.AXIS_SAX);
        }

        // if we can't get a serializer, that is bad.
        if (ser == null) {
            throw new AxisFault(
View Full Code Here

                tmr.register(encodingStyle, tm);
            }
            desc.setTypeMappingRegistry(tmr);
            desc.setTypeMapping(tm);

            SerializerFactory   ser   = null;
            DeserializerFactory deser = null;

            // Try to construct a serializerFactory by introspecting for the
            // following:
            // public static create(Class javaType, QName xmlType)
View Full Code Here

                tm = (TypeMapping) tmr.createTypeMapping();
                tm.setSupportedEncodings(new String[] {encodingStyle});
                tmr.register(encodingStyle, tm);
            }

            SerializerFactory   ser   = null;
            DeserializerFactory deser = null;

            // Try to construct a serializerFactory by introspecting for the
            // following:
            // public static create(Class javaType, QName xmlType)
View Full Code Here

     */
    public static SerializerFactory createFactory(Class factory,
                                                  Class javaType,
                                                  QName xmlType) {

        SerializerFactory sf = null;
        try {
            Method method =
                factory.getMethod(
                    "create",
                    new Class[] {Class.class, QName.class});
View Full Code Here

          TypeSerializerInfo ts = (TypeSerializerInfo) o;
         
             Class javaType = ts.getJavaType();
             QName elementType = ts.getElementType();    
             Object tmp = ts.getSerializer();
            SerializerFactory sf = null;
             if (tmp instanceof SerializerFactory) {
                sf = (SerializerFactory) tmp;
             }
             tmp = ts.getDeserializer();
            DeserializerFactory df = null;
View Full Code Here

    for (Iterator iterator = typeMap.iterator(); iterator.hasNext();) {
      wsifdynamictypemapping = (WSIFDynamicTypeMapping) iterator.next();
      objClass = wsifdynamictypemapping.getJavaType();
      QName xmlType = wsifdynamictypemapping.getXmlType();

      SerializerFactory sf = null;
      DeserializerFactory df = null;
     
      // the context may override the default (de)serializer for a type
      TypeSerializerInfo contextTypeSerializer =
          findContextTypeSerialzer(context, objClass, xmlType);
View Full Code Here

                tm = (TypeMapping) tmr.createTypeMapping();
                tm.setSupportedNamespaces(new String[] {encodingStyle});
                tmr.register(encodingStyle, tm);
            }

            SerializerFactory   ser   = null;
            DeserializerFactory deser = null;

            // Try to construct a serializerFactory by introspecting for the
            // following:
            // public static create(Class javaType, QName xmlType)
View Full Code Here

        registerTypeMapping(javaType, xmlType, sfClass, dfClass, true);
    }
    public void registerTypeMapping(Class javaType, QName xmlType,
                                    Class sfClass, Class dfClass, boolean force){
        // Instantiate the factory using introspection.
        SerializerFactory   sf = BaseSerializerFactory.createFactory  (sfClass, javaType, xmlType);
        DeserializerFactory df = BaseDeserializerFactory.createFactory(dfClass, javaType, xmlType);
        if (sf != null || df != null) {
            registerTypeMapping(javaType, xmlType, sf, df, force);
        }
    }
View Full Code Here

     */
    public static SerializerFactory createFactory(Class factory,
                                                  Class javaType,
                                                  QName xmlType) {

        SerializerFactory sf = null;
        try {
            Method method =
                factory.getMethod(
                    "create",
                    new Class[] {Class.class, QName.class});
View Full Code Here

TOP

Related Classes of org.apache.axis.encoding.SerializerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.