Package org.apache.axis.encoding

Examples of org.apache.axis.encoding.SerializerFactory


            return;
        }

        // 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 (isEnumClass(type)) {
                factory = new EnumSerializerFactory(type, qName);
            } else if (isBeanCompatible(type, true)) {
                factory = new BeanSerializerFactory(type, qName);
            } else {
                return;
            }
        }

        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


                                    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);
View Full Code Here

                                    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);
View Full Code Here

                                                  QName xmlType) {
        if (factory == null) {
            return null;
        }

        SerializerFactory sf = null;
        try {
            Method method =
                factory.getMethod("create", CLASS_QNAME_CLASS);
            sf = (SerializerFactory)
                method.invoke(null,
View Full Code Here

            return true;
        }

        // look up the serializer in the TypeMappingRegistry
        Serializer ser = null;
        SerializerFactory factory = null;

        if (tm != null) {
            factory = (SerializerFactory) tm.getSerializer(type, qName);
        } else {
            factory = (SerializerFactory) defaultTM.getSerializer(type, qName);
        }

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

        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(Messages.getMessage("NoSerializer00",
View Full Code Here

                                    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);
View Full Code Here

            return true;
        }

        // look up the serializer in the TypeMappingRegistry
        SerializerFactory factory;
        factory = (SerializerFactory) tm.getSerializer(type, qName);

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

        // factory is not null
        Serializer ser = (Serializer) factory.getSerializerAs(Constants.AXIS_SAX);

        // if we can't get a serializer, that is bad.
        if (ser == null) {
            throw new AxisFault(Messages.getMessage("NoSerializer00",
                    type.getName()));
View Full Code Here

       
        if (componentTypeQName != null) {
            // if we have a Type QName at this point,
            // this is because ArraySerializer has been instanciated with it
            TypeMapping tm = context.getTypeMapping();
            SerializerFactory factory = (SerializerFactory) tm.getSerializer(
                    componentClass, componentTypeQName);
            while (componentClass.isArray()
                    && factory instanceof ArraySerializerFactory) {
                ArraySerializerFactory asf = (ArraySerializerFactory) factory;
                componentClass = componentClass.getComponentType();
View Full Code Here

                log.debug(org.apache.axis.utils.Messages.getMessage("exception00"), e);
            }
            return null;
        }

        SerializerFactory sf = null;
        try {
            Method method =
                factory.getMethod("create", CLASS_QNAME_CLASS);
            sf = (SerializerFactory)
                method.invoke(null,
View Full Code Here

                                    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);
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.