Examples of TypeMappingRegistry


Examples of javax.xml.rpc.encoding.TypeMappingRegistry

*/
public class MessageServiceJaxRpcProxyFactoryBean extends
        JaxRpcPortProxyFactoryBean {

    protected void postProcessJaxRpcService(Service service) {
       TypeMappingRegistry tmr = service.getTypeMappingRegistry();
       TypeMapping tm = tmr.createTypeMapping();
      
       QName qname = new QName("http://www.apress.com", "MessageBean");
      
       tm.register(MessageBean.class, qname,
               new BeanSerializerFactory(MessageBean.class, qname),
               new BeanDeserializerFactory(MessageBean.class, qname));
      
       tmr.register("http://schemas.xmlsoap.org/soap/encoding/", tm);
    }
View Full Code Here

Examples of javax.xml.rpc.encoding.TypeMappingRegistry

   * @see javax.xml.rpc.Service#getTypeMappingRegistry()
   * @see #setBeanMappings
   * @see #registerBeanMappings(javax.xml.rpc.encoding.TypeMapping)
   */
  public void postProcessJaxRpcService(Service service) {
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.createTypeMapping();

    registerBeanMappings(mapping);

    if (this.encodingStyleUri != null) {
      registry.register(this.encodingStyleUri, mapping);
    }
    else {
      registry.registerDefault(mapping);
    }
  }
View Full Code Here

Examples of javax.xml.rpc.encoding.TypeMappingRegistry

         if (wsdlBindingOperation != null)
            opMetaData.setSOAPAction(wsdlBindingOperation.getSOAPAction());

         // Get the type mapping for the encoding style
         String encStyle = epMetaData.getEncodingStyle().toURI();
         TypeMappingRegistry tmRegistry = new TypeMappingRegistryImpl();
         TypeMappingImpl typeMapping = (TypeMappingImpl)tmRegistry.getTypeMapping(encStyle);

         // Build the parameter meta data
         if (opMetaData.getStyle() == Style.RPC)
         {
            buildParameterMetaDataRpc(opMetaData, wsdlOperation, seiMethodMapping, typeMapping);
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

            }
        }
        //register our type descriptors
        Service service = ((ServiceImpl) serviceImpl).getService();
        AxisEngine axisEngine = service.getEngine();
        TypeMappingRegistry typeMappingRegistry = axisEngine.getTypeMappingRegistry();
        TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(encodingStyle);
        typeMapping.register(BigInteger.class,
                Constants.XSD_UNSIGNEDLONG,
                new SimpleSerializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG),
                new SimpleDeserializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG));
        typeMapping.register(URI.class,
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

            }
        }
        //register our type descriptors
        Service service = ((ServiceImpl) serviceImpl).getService();
        AxisEngine axisEngine = service.getEngine();
        TypeMappingRegistry typeMappingRegistry = axisEngine.getTypeMappingRegistry();
        TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(encodingStyle);
        typeMapping.register(BigInteger.class,
                Constants.XSD_UNSIGNEDLONG,
                new SimpleSerializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG),
                new SimpleDeserializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG));
        typeMapping.register(URI.class,
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

            }
        }
        //register our type descriptors
        Service service = ((ServiceImpl) serviceImpl).getService();
        AxisEngine axisEngine = service.getEngine();
        TypeMappingRegistry typeMappingRegistry = axisEngine.getTypeMappingRegistry();
        TypeMapping typeMapping = typeMappingRegistry.getOrMakeTypeMapping(encodingStyle);
        typeMapping.register(BigInteger.class,
                Constants.XSD_UNSIGNEDLONG,
                new SimpleSerializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG),
                new SimpleDeserializerFactory(BigInteger.class, Constants.XSD_UNSIGNEDLONG));
        typeMapping.register(URI.class,
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        SerializationContext context = new SerializationContextImpl(stringWriter, msgContext);
        context.setDoMultiRefs(false)// no multirefs
        context.setPretty(false);

        // Create a TypeMapping and register the Bean serializer/deserializer
        TypeMappingRegistry reg = context.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        // The "" namespace is literal (no encoding).
        tm.setSupportedEncodings(new String[] {Constants.URI_DEFAULT_SOAP_ENC});
        reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);

        QName beanQName = new QName("typeNS", "TheBean");
        tm.register(AttributeBean.class,
                    beanQName,
                    new BeanSerializerFactory(AttributeBean.class, beanQName),
View Full Code Here

Examples of org.apache.axis.encoding.TypeMappingRegistry

        SerializationContext context = new SerializationContextImpl(writer,
                                                                    msgContext);
        context.setDoMultiRefs(false);

        // Create a TypeMapping and register the Bean serializer/deserializer
        TypeMappingRegistry reg = context.getTypeMappingRegistry();
        TypeMapping tm = (TypeMapping) reg.createTypeMapping();
        // The "" namespace is literal (no encoding).
        tm.setSupportedEncodings(new String[] {Constants.URI_DEFAULT_SOAP_ENC});
        reg.register(Constants.URI_DEFAULT_SOAP_ENC, tm);

        QName beanQName = new QName("typeNS", "Bean");
        tm.register(SimpleBean.class,
                    beanQName,
                    new SimpleSerializerFactory(SimpleBean.class, beanQName),
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.
        return tmr.getOrMakeTypeMapping(getEncodingStyle());
    }
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("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,
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.