The Spring Framework

## org.springframework.remoting.jaxrpc.support
Class AxisBeanMappingServicePostProcessor

    java.lang.Object
      org.springframework.remoting.jaxrpc.support.AxisBeanMappingServicePostProcessor

All Implemented Interfaces:
  BeanClassLoaderAware, JaxRpcServicePostProcessor

    public class AxisBeanMappingServicePostProcessor

extends Object
implements JaxRpcServicePostProcessor, BeanClassLoaderAware

Axis-specific `JaxRpcServicePostProcessor` that registers bean mappings for domain objects that follow the JavaBean pattern.

The same mappings are usually also registered at the server in Axis' "server-config.wsdd" file.

To be registered as a service post-processor on a `LocalJaxRpcServiceFactoryBean` or `JaxRpcPortProxyFactoryBean`, carrying appropriate configuration.

Note: Without such explicit bean mappings, a complex type like a domain object cannot be transferred via SOAP.

Since:
  2.0
Author:
  Juergen Hoeller
See Also:
  `BeanSerializerFactory`, `BeanDeserializerFactory`, `LocalJaxRpcServiceFactory.setServicePostProcessors(org.springframework.remoting.jaxrpc.JaxRpcServicePostProcessor[])`, `LocalJaxRpcServiceFactory.setServicePostProcessors(org.springframework.remoting.jaxrpc.JaxRpcServicePostProcessor[])`

Constructor Summary
`AxisBeanMappingServicePostProcessor()`

Method Summary
`protected QName` `getTypeQName(String name)` Return a `QName` for the given name, relative to the `namespace URI` of this post-processor, if given.
`void` `postProcessJaxRpcService(Service service)` Register the specified bean mappings on the given Service's `TypeMappingRegistry`.
`protected void` `registerBeanMapping(TypeMapping mapping, Class javaType, QName wsdlType)` Register a bean mapping for the given Java type and WSDL type.
`protected void` `registerBeanMapping(TypeMapping mapping, Class javaType, String wsdlTypeName)` Register a bean mapping for the given Java type and WSDL type name.
`protected void` `registerBeanMappings(TypeMapping mapping)` Perform the actual bean mapping registration.
`void` `setBeanClasses(Class[] beanClasses)` Specify the bean mappings to register as Java types, with the WSDL type names inferred from the Java type names (using the short, that is, non-fully-qualified class name).
`void` `setBeanClassLoader(ClassLoader beanClassLoader)` Callback that supplies the bean `class loader` to a bean instance.
`void` `setBeanMappings(Properties beanMappingProps)` Specify the bean mappings to register as String-String pairs, with the Java type name as key and the WSDL type name as value.
`void` `setEncodingStyleUri(String encodingStyleUri)` Set the encoding style URI to use for the type mapping.
`void` `setTypeNamespaceUri(String typeNamespaceUri)` Set the application-specific namespace to use for XML types, for example "urn:JPetStore".

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AxisBeanMappingServicePostProcessor

    public AxisBeanMappingServicePostProcessor()

Method Detail

### setEncodingStyleUri

    public void setEncodingStyleUri(String encodingStyleUri)

  Set the encoding style URI to use for the type mapping.

  A typical value is "http://schemas.xmlsoap.org/soap/encoding/", as suggested by the JAX-RPC javadoc. However, note that the default behavior of this post-processor is to register the type mapping as JAX-RPC default if no explicit encoding style URI is given.

  See Also:
    `TypeMappingRegistry.register(java.lang.String, javax.xml.rpc.encoding.TypeMapping)`, `TypeMappingRegistry.registerDefault(javax.xml.rpc.encoding.TypeMapping)`

### setTypeNamespaceUri

    public void setTypeNamespaceUri(String typeNamespaceUri)

  Set the application-specific namespace to use for XML types, for example "urn:JPetStore".

  See Also:
    `TypeMapping.register(java.lang.Class, javax.xml.namespace.QName, javax.xml.rpc.encoding.SerializerFactory, javax.xml.rpc.encoding.DeserializerFactory)`

### setBeanMappings

    public void setBeanMappings(Properties beanMappingProps)

  Specify the bean mappings to register as String-String pairs, with the Java type name as key and the WSDL type name as value.

### setBeanClasses

    public void setBeanClasses(Class[] beanClasses)

  Specify the bean mappings to register as Java types, with the WSDL type names inferred from the Java type names (using the short, that is, non-fully-qualified class name).

### setBeanClassLoader

    public void setBeanClassLoader(ClassLoader beanClassLoader)

  Description copied from interface: `BeanClassLoaderAware`
  Callback that supplies the bean `class loader` to a bean instance.

  Invoked after the population of normal bean properties but before an initialization callback such as `InitializingBean's` `InitializingBean.afterPropertiesSet()` method or a custom init-method.

  Specified by:
    `setBeanClassLoader` in interface `BeanClassLoaderAware`
  Parameters:
    `beanClassLoader` - the owning class loader; may be `null` in which case a default `ClassLoader` must be used, for example the `ClassLoader` obtained via `ClassUtils.getDefaultClassLoader()`

### postProcessJaxRpcService

    public void postProcessJaxRpcService(Service service)

  Register the specified bean mappings on the given Service's `TypeMappingRegistry`.

  Specified by:
    `postProcessJaxRpcService` in interface `JaxRpcServicePostProcessor`
  Parameters:
    `service` - the current JAX-RPC `Service` (can be cast to an implementation-specific class if necessary)
  See Also:
    `Service.getTypeMappingRegistry()`, `setBeanMappings(java.util.Properties)`, `registerBeanMappings(javax.xml.rpc.encoding.TypeMapping)`

### registerBeanMappings

    protected void registerBeanMappings(TypeMapping mapping)

  Perform the actual bean mapping registration.

  Parameters:
    `mapping` - the JAX-RPC `TypeMapping` to operate on
  See Also:
    `setBeanMappings(java.util.Properties)`, `registerBeanMapping(javax.xml.rpc.encoding.TypeMapping, Class, String)`

### registerBeanMapping

    protected void registerBeanMapping(TypeMapping mapping,
                                       Class javaType,
                                       String wsdlTypeName)

  Register a bean mapping for the given Java type and WSDL type name.

  Parameters:
    `mapping` - the JAX-RPC `TypeMapping` to operate on
    `javaType` - the Java type
    `wsdlTypeName` - the WSDL type name (as a `String`)

### registerBeanMapping

    protected void registerBeanMapping(TypeMapping mapping,
                                       Class javaType,
                                       QName wsdlType)

  Register a bean mapping for the given Java type and WSDL type.

  Parameters:
    `mapping` - the JAX-RPC `TypeMapping` to operate on
    `javaType` - the Java type
    `wsdlType` - the WSDL type (as XML `QName`)

### getTypeQName

    protected final QName getTypeQName(String name)

  Return a `QName` for the given name, relative to the `namespace URI` of this post-processor, if given.

The Spring Framework

Copyright © 2002-2008 The Spring Framework.