Package org.apache.axis.encoding

Examples of org.apache.axis.encoding.SerializerFactory


            return Constants.NSPREFIX_SOAP_ENC + ":" +
                    getTypeQName(type).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 (factory == null) {
            // If no factory is found, try the BeanSerializerFactory if
            // the type is not Throwable.  (There is no mapping for
            // java types that extend Throwable.)
            factory = new BeanSerializerFactory(type, getTypeQName(type));
        }
        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


            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

                                                  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

            if (encodingStyle == null) {
                encodingStyle = Constants.URI_DEFAULT_SOAP_ENC;
            }
            TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);

            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

            }
            TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);
            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

                .loadClass("org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory");
        Constructor<SerializerFactory> sfCon = sfClass.getConstructor(
                Class.class, QName.class);
        Constructor<DeserializerFactory> dsfCon = dsfClass.getConstructor(
                Class.class, QName.class);
        SerializerFactory sf = sfCon.newInstance(cls, q);
        DeserializerFactory dsf = dsfCon.newInstance(cls, q);
        mTypeMapping.register(cls, q, sf, dsf);
    }
View Full Code Here

                                sfClass.getConstructor(Class.class,
                                                       QName.class);
                            Constructor<DeserializerFactory> dsfCon =
                                dsfClass.getConstructor(Class.class,
                                                        QName.class);
                            SerializerFactory sf = sfCon.newInstance(cls, q);
                            DeserializerFactory dsf = dsfCon.newInstance(cls, q);
                            mTypeMapping.register(cls, q, sf, dsf);
                        } catch (Exception e) {
                            /*
                             * FIXME jcolwell@bea.com 2004-Oct-08 --
View Full Code Here

            if (encodingStyle == null) {
                encodingStyle = Constants.URI_DEFAULT_SOAP_ENC;
            }
            TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);

            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

            }
            TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);
            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

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.