Examples of TypeMapping


Examples of org.apache.axis.encoding.TypeMapping

     */
    public void registerTypeMapping(Class javaType, QName xmlType,
                                    SerializerFactory sf,
                                    DeserializerFactory df,
                                    boolean force) {
        TypeMapping tm = getTypeMapping();
        if (!force && tm.isRegistered(javaType, xmlType))
            return;

        // Register the information
        tm.register(javaType, xmlType, sf, df);
    }
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

                "</methodResult>\n" +
              "</soap:Body>\n" +
            "</soap:Envelope>\n";

        TypeMappingRegistry tmr = server.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) tmr.createTypeMapping();
        tm.setSupportedEncodings(new String[] {Constants.URI_DEFAULT_SOAP_ENC});
        tmr.register(Constants.URI_DEFAULT_SOAP_ENC, tm);
        tm.register(java.lang.String[].class,
                    new QName("http://soapinterop.org/xsd", "ArrayOfString"),
                    new org.apache.axis.encoding.ser.ArraySerializerFactory(),
                    new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
        tm.register(java.lang.Object[].class,
                    new QName("http://soapinterop.org/xsd", "ArrayOfObject"),
                    new org.apache.axis.encoding.ser.ArraySerializerFactory(),
                    new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
        tm.register(samples.echo.SOAPStruct.class,
                    new QName("http://soapinterop.org/xsd", "SOAPStruct"),
                    new org.apache.axis.encoding.ser.BeanSerializerFactory(
                          samples.echo.SOAPStruct.class,
                          new QName("http://soapinterop.org/xsd", "SOAPStruct")),
                    new org.apache.axis.encoding.ser.BeanDeserializerFactory(
                          samples.echo.SOAPStruct.class,
                          new QName("http://soapinterop.org/xsd", "SOAPStruct")));
        tm.register(samples.echo.SOAPStruct[].class,
                    new QName("http://soapinterop.org/xsd", "ArrayOfSOAPStruct"),
                    new org.apache.axis.encoding.ser.ArraySerializerFactory(),
                    new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
        tm.register(samples.echo.SOAPStructStruct.class,
                    new QName("http://soapinterop.org/xsd", "SOAPStructStruct"),
                    new org.apache.axis.encoding.ser.BeanSerializerFactory(
                          samples.echo.SOAPStructStruct.class,
                          new QName("http://soapinterop.org/xsd", "SOAPStructStruct")),
                    new org.apache.axis.encoding.ser.BeanDeserializerFactory(
                          samples.echo.SOAPStructStruct.class,
                          new QName("http://soapinterop.org/xsd", "SOAPStructStruct")));
        tm.register(test.encoding.IndexPropBean.class,
                    new QName("http://encoding.test", "IndexPropBean"),
                    new org.apache.axis.encoding.ser.BeanSerializerFactory(
                          test.encoding.IndexPropBean.class,
                          new QName("http://encoding.test", "IndexPropBean")),
                    new org.apache.axis.encoding.ser.BeanDeserializerFactory(
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

        SerializationContext context = new SerializationContextImpl(stringWriter, msgContext);
        context.setDoMultiRefs(multiref);

        // Create a TypeMapping and register the specialized Type Mapping
        TypeMappingRegistry reg = context.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        tm.setSupportedEncodings(new String[] {Constants.URI_DEFAULT_SOAP_ENC});
        reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);

        QName dataQName = new QName("typeNS", "Data");
        tm.register(Data.class, dataQName, new DataSerFactory(), new DataDeserFactory());

        msg.output(context);

        String msgString = stringWriter.toString();
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

                    (BeanPropertyDescriptor) propertyMap.get(fieldName);
            if (bpd != null) {
                if (!bpd.isWriteable() || bpd.isIndexed() ) continue ;

                // determine the QName for this child element
                TypeMapping tm = context.getTypeMapping();
                Class type = bpd.getType();
                QName qn = tm.getTypeQName(type);
                if (qn == null)
                    throw new SAXException(
                            Messages.getMessage("unregistered00", type.toString()));

                // get the deserializer
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

        if (xmlType != null) {
            // Use the xmlType to get the deserializer.
            dSer = context.getDeserializerForType(xmlType);
        } else {
            // If the xmlType is not set, get a default xmlType
            TypeMapping tm = context.getTypeMapping();
            QName defaultXMLType = tm.getTypeQName(javaType);
            // If there is not href, then get the deserializer
            // using the javaType and default XMLType,
            // If there is an href, the create the generic
            // DeserializerImpl and set its default type (the
            // default type is used if the href'd element does
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

     * @param parameterMode one of IN, OUT or INOUT
     */
    public void addParameter(QName paramName, QName xmlType,
            ParameterMode parameterMode) {
        Class javaType = null;
        TypeMapping tm = getTypeMapping();
        if (tm != null) {
            javaType = tm.getClassForQName(xmlType);
        }
        addParameter(paramName, xmlType, javaType, parameterMode);
    }
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

     * @param parameterMode  one of IN, OUT or INOUT
     */
    public void addParameter(String paramName, QName xmlType,
            ParameterMode parameterMode) {
        Class javaType = null;
        TypeMapping tm = getTypeMapping();
        if (tm != null) {
            javaType = tm.getClassForQName(xmlType);
        }
        addParameter(new QName("", paramName), xmlType, javaType, parameterMode);
    }
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

        // JSR 101 which indicates an exception MAY be thrown.

        //if (parmAndRetReq) {
        returnType = type ;
        operation.setReturnType(type);
        TypeMapping tm = getTypeMapping();
        operation.setReturnClass(tm.getClassForQName(type));
        parmAndRetReq = true;
        //}
        //else {
        //throw new JAXRPCException(Messages.getMessage("noParmAndRetReq"));
        //}
View Full Code Here

Examples of org.apache.axis.encoding.TypeMapping

    {
        // Get the TypeMappingRegistry
        TypeMappingRegistry tmr = msgContext.getTypeMappingRegistry();

        // If a TypeMapping is not available, add one.
        TypeMapping tm = (TypeMapping) tmr.getTypeMapping(getEncodingStyle());
        TypeMapping defaultTM = (TypeMapping) tmr.getDefaultTypeMapping();
        if (tm == null || tm == defaultTM ) {
            tm = (TypeMapping) tmr.createTypeMapping();
            tm.setSupportedEncodings(new String[] {getEncodingStyle()});
            tmr.register(getEncodingStyle(), tm);
        }
View Full Code Here

Examples of org.apache.cxf.aegis.type.TypeMapping

        Class c = inf.getTypeClass().getSuperclass();
        /*
         * Don't dig any deeper than Object or Exception
         */
        if (c != null && c != Object.class && c != Exception.class && c != RuntimeException.class) {
            TypeMapping tm = inf.getTypeMapping();
            Type superType = tm.getType(c);
            if (superType == null) {
                // if we call createType, we know that we'll get a BeanType. */
                superType = (BeanType)getTypeMapping().getTypeCreator().createType(c);
                Class cParent = c.getSuperclass();
                if (cParent != null && cParent != Object.class) {
                    ((BeanType)superType).getTypeInfo().setExtension(true);
                }
                tm.register(superType);
            }
            return superType;
        } else {
            return null;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.