Examples of TypeMappingRegistry


Examples of org.apache.axis.encoding.TypeMappingRegistry

        log.debug("MessageContext: setServiceHandler("+sh+")");
        serviceHandler = sh;
        if (sh != null) {
            targetService = sh.getName();
            SOAPService service = (SOAPService)sh;
            TypeMappingRegistry tmr = service.getTypeMappingRegistry();
            setTypeMappingRegistry(tmr);
            setOperationStyle(service.getStyle());

            // styles are not "soap version aware" so compensate...
            setEncodingStyle(service.getStyle().getEncoding());
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        Class javaType = Data.class;
        QName xmlType = new QName("urn:foo", "Data");
        BeanSerializerFactory   sf = new BeanSerializerFactory(javaType, xmlType);
        BeanDeserializerFactory df = new BeanDeserializerFactory(javaType, xmlType);

        TypeMappingRegistry tmr = engine.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) tmr.getTypeMapping(Constants.URI_DEFAULT_SOAP_ENC);
        if (tm == null || tm == tmr.getDefaultTypeMapping()) {
            tm = (TypeMapping) tmr.createTypeMapping();
            tmr.register(Constants.URI_DEFAULT_SOAP_ENC, tm);
        }
        tm.register(javaType, xmlType, sf, df);

        ServiceDesc desc = new ServiceDesc();
        desc.loadServiceDescByIntrospection(Service.class, tm);
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

    }

    public TypeMapping getTypeMapping()
    {
        // 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);
        }
        return tm;
    }
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

            "<SOAP-ENV:Body>\n";
        footer =
            "</SOAP-ENV:Body>\n"+
            "</SOAP-ENV: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(test.encoding.beans.SbTravelRequest.class,
                new QName("http://www.sidestep.com/sbws", "SbTravelRequest"),
                new org.apache.axis.encoding.ser.BeanSerializerFactory(
                        test.encoding.beans.SbTravelRequest.class,
                        new QName("http://www.sidestep.com/sbws", "SbTravelRequest")),
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        footer =
                "</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("urn:me", "ArrayOfString"),
                    new org.apache.axis.encoding.ser.ArraySerializerFactory(),
                    new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
        tm.register(java.lang.Object[].class,
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        }
    }

    public TypeMappingRegistry getTypeMappingRegistry()
    {
        TypeMappingRegistry tmr = null;
        try {
            tmr = config.getTypeMappingRegistry();
        } catch (ConfigurationException e) {
            log.error(JavaUtils.getMessage("axisConfigurationException00"), e);
        }
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        log.debug("MessageContext: setServiceHandler("+sh+")");
        serviceHandler = sh;
        if (sh != null) {
            targetService = sh.getName();
            SOAPService service = (SOAPService)sh;
            TypeMappingRegistry tmr = service.getTypeMappingRegistry();
            setTypeMappingRegistry(tmr);
            setOperationStyle(service.getStyle());

            // styles are not "soap version aware" so compensate...
            setEncodingStyle(service.getStyle().getEncoding());
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        Class javaType = Data.class;
        QName xmlType = new QName("urn:foo", "Data");
        BeanSerializerFactory   sf = new BeanSerializerFactory(javaType, xmlType);
        BeanDeserializerFactory df = new BeanDeserializerFactory(javaType, xmlType);

        TypeMappingRegistry tmr = engine.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) tmr.getTypeMapping(Constants.URI_DEFAULT_SOAP_ENC);
        if (tm == null || tm == tmr.getDefaultTypeMapping()) {
            tm = (TypeMapping) tmr.createTypeMapping();
            tmr.register(Constants.URI_DEFAULT_SOAP_ENC, tm);
        }
        tm.register(javaType, xmlType, sf, df);

        ServiceDesc desc = new ServiceDesc();
        desc.loadServiceDescByIntrospection(Service.class, tm);
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

            "<SOAP-ENV:Body>\n";
        footer =
            "</SOAP-ENV:Body>\n"+
            "</SOAP-ENV: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(test.encoding.beans.SbTravelRequest.class,
                new QName("http://www.sidestep.com/sbws", "SbTravelRequest"),
                new org.apache.axis.encoding.ser.BeanSerializerFactory(
                        test.encoding.beans.SbTravelRequest.class,
                        new QName("http://www.sidestep.com/sbws", "SbTravelRequest")),
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        Writer stringWriter = new StringWriter();
        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);
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.