A typemapping maps a qualified XML name to a Java type. Global typemappings visible to all services can be deployed in a deployment element, or the visibility can be confined to a service if the typeMapping element is inside a service element. There are additional differences aside from visibility. For example, if a global typemapping is deployed a second time, the old mapping will remain and the new configuration will not be used. The effects may be hard to debug.
If a BeanSerializer and BeanDeSerializer are used in a typemapping, then the namespace for the corresponding XML schema type in a generated WSDL document differs depending on the location of the typemapping element. A mapping inside a service uses the service's namespace. A global mapping always derives a namespace from the Java package of the Java type.
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<typeMapping xmlns:ns="http://soapinterop.org/xsd"
qname="ns:ArrayOfString"
type="java:java.lang.String[]"
serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
<service>
...
</service>
</deployment> |
If the BeanSerializer and BeanDeSerializer are used in a typemapping the abbreviated form beanMapping can be used instead.
| Name | Mandatory | Default | Description | Examples |
|---|---|---|---|---|
| qname | yes | - | The qualified name of XML elements used for serialization | tns:Order |
| type | no | - | Java class for the mapping. The name must be qualified in the namespace http://xml.apache.org/axis/wsdd/providers/java . | java:com.osmoticweb.Order |
| languageSpecificType | no | - | Java class for the mapping. This attribute can be used instead of the attribute type. | com.osmoticweb.Order |
| encodingStyle | no | Depends on the used SOAP version | SOAP encoding used for serialization. The URI for SOAP 1.1 encoding or SOAP 1.2 encoding can be used as value. | http://schemas.xmlsoap.org/soap/encoding/ , http//www.w3.org/2003/05/soap-encoding |
| serializer | yes | - | Factory for serializer | org.apache.axis.encoding.ser.BeanSerializerFactory |
| deserializer | yes | - | Factory for deserializer | org.apache.axis.encoding.ser.BeanDeserializerFactory |
Provided by Orientation in Objects