The following mapping properties apply only to Web services using the IBM® SOAP run-time environment.
Property | Description |
---|---|
Encoding style | Rules for serializing data over SOAP protocol. Literal XML, http://xml.apache.org/xml-soap/literalxml, is based on an XML schema instance. SOAP encoding, http://schemas.xmlsoap.org/soap/ encoding/, is based on a simple type system that is a generalization of the common features found in type systems in programming languages, databases, and semi-structured data. Encodings define how data values, defined in the application, can be translated to and from protocol format. For more information on SOAP encoding, refer to www.w3.org/TR/SOAP |
XML type namespace | Serves as a prefix in an XML document in order to uniquely identify an organization and to avoid element name conflicts. |
XML type name | Name of a complex type or simple type as defined in XSD. |
Bean class | The fully qualified name of a Java class that encapsulates a collection of data and methods to operate on the data. |
Serializer class (SOAP only) | At run time, converts an instance of the bean class into an instance of the XML type according to the encoding style. The fully qualified name of a class that implements the org.apache.soap.util.xml.Serializer interface. |
Deserializer class (SOAP only) | At run time, converts an instance of the XML types of the given Encoding style into an instance of the bean class. The fully qualified name of a class that implements the org.apache.soap.util.xml.Deserializer interface. |
Marshaller method (HTTP only) | At run time, converts an instance of the bean class into a string for transmission over HTTP. |
Unmarshaller method (HTTP only) | At run time, converts an instance of a string received over HTTP into an instance of the bean class. |
A mapping specifies an association between an XML Qname, a Java class name, an encoding style, and the serializer and deserializer used to convert between instances of the class and encoded instances of the XML Qname. The two mapping directions are referred to as Java to XML and XML to Java.
The SOAP V2.3 run-time environment holds a table of such mapping entries, called the SOAPMappingRegistry.
In the type mapping registry, a single Java type can map to at most one XSD type, and a single XSD type can map to at most one Java type. Most standard Java types as well as Java beans are supported by default.
The Mappings from Java to WSDL XSD (2001) table shows the default mappings from Java data types to WSDL part types for the SOAP and Literal XML encoding styles, as defined by the WSDL SOAP binding. The table also shows the serializer and deserializer configured into the SOAP run-time environment to perform the actual conversion between Java and XML. Combinations of Java type and encoding style that are not listed in this table default to Custom mapping.
Java Type | Encoding Style | XML Type namespace Note 1 | XML Type name | Serializer | Deserializer | Mapping Style | Comments |
---|---|---|---|---|---|---|---|
boolean, java.lang.Boolean | SOAP | xsd | boolean | - | - | Bean | |
byte, java.lang.Byte | SOAP | xsd | byte | - | - | Bean | |
short, java.lang.Short | SOAP | xsd | short | - | - | Bean | |
int, java.lang.Integer | SOAP | xsd | int | - | - | Bean | |
long, java.lang.Long | SOAP | xsd | long | - | - | Bean | |
float, java.lang.Float | SOAP | xsd | float | - | - | Bean | |
double, java.lang.Double | SOAP | xsd | double | - | - | Bean | |
java.lang.String | SOAP | xsd | string | - | - | Bean | |
java.math.BigDecimal | SOAP | xsd | decimal | - | - | Bean | |
java.util.GregorianCalendar | SOAP | xsd | date | - | - | Bean | |
java.util.Date | SOAP | xsd | dateTime | - | - | Bean | |
java.util.Vector | SOAP | xml-soap Note 2 Note 20 | Vector | - | - | Bean | |
java.util.Map | SOAP | xml-soap Note 2 Note 20 | Map | - | - | Bean | |
java.util.Hashtable | SOAP | xml-soap Note 2 Note 20 | Map | - | - | Bean | |
byte[] | SOAP | soap-enc Note 3 | base64 | - | - | Bean | |
T[] (array of a type, T) | SOAP | soap-enc Note 3 | Array Note 4 | - | - | Bean | Provided T is neither byte nor org.w3c.dom.Element. |
org.w3c.dom.Element | Literal XML | Note 5 | Note 6 | N/A | N/A | Element | |
Java Bean | SOAP | Note 5 | Note 7 | BeanSerializer | BeanSerializer | Bean | The qualified serializer/deserializer class name is org.apache.soap. encoding.soapenc. BeanSerializer. |
The Mappings from WSDL XSD to Java (SOAP binding) table describes the default mappings from WSDL part types to Java data types for the SOAP and Literal XML encoding styles, as defined by the WSDL SOAP binding. The table also shows the serializer and deserializer configured into the SOAP run-time environment to perform the actual conversion between Java and XML. Combinations of WSDL part type and encoding style that are not listed in this table default to Custom mapping.
XML Type namespace Note 1 | XML Type name | Encoding style | Java class | Serializer class | Deserializer class | Mapping style | Comments |
---|---|---|---|---|---|---|---|
xsd | boolean | SOAP | boolean, java.lang.Boolean Note 22 | - | - | Bean | |
xsd | byte | SOAP | byte, java.lang.Byte Note 22 | - | - | Bean | |
xsd | short | SOAP | short, java.lang.Short Note 22 | - | - | Bean | |
xsd | int | SOAP | int, java.lang.Integer Note 22 | - | - | Bean | |
xsd | long | SOAP | long, java.lang.Long Note 22 | - | - | Bean | |
xsd | float | SOAP | float, java.lang.Float Note 22 | - | - | Bean | |
xsd | double | SOAP | double, java.lang.Double Note 22 | - | - | Bean | |
xsd | string | SOAP | string | - | - | Bean | |
xsd | decimal | SOAP | java.math.BigDecimal | - | - | Bean | |
xsd | date | SOAP | java.util.GregorianCalendar | - | - | Bean | |
xsd | dateTime Note 10 | SOAP | java.util.Date | - | - | Bean | |
xml-soap Note 2 | Vector | SOAP | java.util.Vector | - | - | Bean | |
xml-soap Note 2 | Map | SOAP | java.util.Map Note 21 | - | - | Bean | |
soap-enc Note 3 | base64 | SOAP | byte[] | - | - | Bean | |
soap-enc Note 3 | Array | SOAP | T[] Note 4 | - | - | Bean | T is the mapping from wsdl:arrayType Note 4 |
some-namespace Note 12 | some-complex-type (in XSD 2001) Note 12 | SOAP | Note 14 | BeanSerializer | BeanSerializer | Bean | The qualified serializer/deserializer class name is com.ibm.etools. webservice.runtime. XSDAnyTypeSerializer BeanSerializer. |
some-namespace Note 12 | some-complex-type (in XSD 2001) Note 12 | Literal XML | Note 14 | N/A | N/A | Bean | The conversion is handled in the generated proxy or skeleton, not in the SOAP run-time environment via SOAP serializers or deserializers. |
some-namespace Note 12 | some-complex-type (in XSD 2001) Note 12 | Literal XML | org.w3c.dom.Element Note 15 | N/A | N/A | Element | |
some-namespace Note 13 | some-type Note 13 | Literal XML | org.w3c.dom.Element Note 16 | N/A | N/A | Element | |
xsd | anyType Note 11 | Literal XML | org.w3c.dom.Element | N/A | N/A | Element | |
xsd | base64Binary | SOAP | byte[] | - | - | Bean | |
xsd | hexbinary | SOAP | byte[] | - | - | Bean | |
xml soap | Element | Literal XML | org.w3c.dom.Element | - | - | Element |
The Mappings from WSDL XSD to Java (HTTP bindings) table describes the default mappings from WSDL part types to Java data types for the HTTP GET and POST bindings. Combinations of WSDL part type and encoding style that are not listed in this table default to Custom mapping and require the user to provide marshaller and unmarshaller methods.
XML Type namespace Note 1 | XML Type name | MIME type(s) | Java class | Mapping style |
---|---|---|---|---|
xsd | boolean | text/plain text/xml mimeXml | boolean | Bean |
xsd | byte | text/plain text/xml mimeXml | byte | Bean |
xsd | short | text/plain text/xml mimeXml | short | Bean |
xsd | int | text/plain text/xml mimeXml | int | Bean |
xsd | long | text/plain text/xml mimeXml | long | Bean |
xsd | float | text/plain text/xml mimeXml | float | Bean |
xsd | double | text/plain text/xml mimeXml | double | Bean |
xsd | string | text/plain text/xml mimeXml | string | Bean |
xsd | decimal | text/plain text/xml mimeXml | java.math.BigDecimal | Bean |
xsd | date | text/plain text/xml mimeXml | java.util.GregorianCalendar | Bean |
xsd | dateTime Note 10 | mimeXml text/plain text/xml | java.util.Date | Bean |
some-namespace Note 12 | some-complex-type (in XSD 2001) Note 12 | mimeXml | Note 14 | Bean |
some-namespace Note 12 | some-complex-type (in XSD 2001) Note 12 | mimeXml | org.w3c.dom.Element Note 17 | Element |
some-namespace Note 12 | some-complex-type (in XSD 2001) Note 12 | text/xml | org.w3c.dom.Element Note 18 | Element |
some-namespace Note 13 | some-type Note 13 | mimeXml text/xml | org.w3c.dom.Element Note 19 | Element |
xsd | anyType Note 11 | mimeXml text/xml | org.w3c.dom.Element | Element |
Name mapping rules
A mapping defines an association between a qualified XML element name, a Java class name, and an encoding. A mapping specifies how, under the given encoding, an incoming XML element with a fully qualified name is to be converted to a Java class and vice versa. The two mapping directions are referred to as Java to XML and XML to Java.
Parent topic: WSDL files generated by the IBM SOAP runtime
Related Tasks
Developing Web services