Top Description Methods
javax.xml.rpc.encoding

public Interface TypeMapping

Imports
javax.xml.rpc.JAXRPCException, java.util.Iterator, javax.xml.namespace.QName

The javax.xml.rpc.encoding.TypeMapping is the base interface for the representation of a type mapping. A TypeMapping implementation class may support one or more encoding styles.

For its supported encoding styles, a TypeMapping instance maintains a set of tuples of the type {Java type, SerializerFactory, DeserializerFactory, XML type}.

Author
Rahul Sharma
Version
1.0

Method Summary

Modifier and TypeMethod and Description
public DeserializerFactory

Returns:

Registered DeserializerFactory or null if there is no registered factory
getDeserializer
(Class<T>
Class of the Java type
javaType
,
QName
Qualified name of the XML data type
xmlType
)

Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.

public SerializerFactory

Returns:

Registered SerializerFactory or null if there is no registered factory
getSerializer
(Class<T>
Class of the Java type
javaType
,
QName
Qualified name of the XML data type
xmlType
)

Gets the SerializerFactory registered for the specified pair of Java type and XML data type.

public String[]

Returns:

Array of encodingStyle URIs for the supported encoding styles
getSupportedEncodings
()

Returns the encodingStyle URIs (as String[]) supported by this TypeMapping instance.

public boolean

Returns:

boolean; true if type mapping between the specified XML type and Java type is registered; otherwise false
isRegistered
(Class<T>
Class of the Java type
javaType
,
QName
Qualified name of the XML data type
xmlType
)

Checks whether or not type mapping between specified XML type and Java type is registered.

public void
register(Class<T>
Class of the Java type
javaType
,
QName
Qualified name of the XML data type
xmlType
,
SerializerFactory
SerializerFactory
sf
,
DeserializerFactory
DeserializerFactory
dsf
)

Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type.

public void
removeDeserializer(Class<T> javaType, QName xmlType)

Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.

public void
removeSerializer(Class<T> javaType, QName xmlType)

Removes the SerializerFactory registered for the specified pair of Java type and XML data type.

public void
setSupportedEncodings(String[]
Array of encodingStyle URIs for the supported encoding styles
encodingStyleURIs
)

Sets the encodingStyle URIs supported by this TypeMapping instance.

Method Detail

getDeserializerback to summary
public DeserializerFactory getDeserializer(Class<T> javaType, QName xmlType)

Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.

Parameters
javaType:Class<T>

Class of the Java type

xmlType:QName

Qualified name of the XML data type

Returns:DeserializerFactory

Registered DeserializerFactory or null if there is no registered factory

getSerializerback to summary
public SerializerFactory getSerializer(Class<T> javaType, QName xmlType)

Gets the SerializerFactory registered for the specified pair of Java type and XML data type.

Parameters
javaType:Class<T>

Class of the Java type

xmlType:QName

Qualified name of the XML data type

Returns:SerializerFactory

Registered SerializerFactory or null if there is no registered factory

getSupportedEncodingsback to summary
public String[] getSupportedEncodings()

Returns the encodingStyle URIs (as String[]) supported by this TypeMapping instance. A TypeMapping that contains only encoding style independent serializers and deserializers returns null from this method.

Returns:String[]

Array of encodingStyle URIs for the supported encoding styles

isRegisteredback to summary
public boolean isRegistered(Class<T> javaType, QName xmlType)

Checks whether or not type mapping between specified XML type and Java type is registered.

Parameters
javaType:Class<T>

Class of the Java type

xmlType:QName

Qualified name of the XML data type

Returns:boolean

boolean; true if type mapping between the specified XML type and Java type is registered; otherwise false

registerback to summary
public void register(Class<T> javaType, QName xmlType, SerializerFactory sf, DeserializerFactory dsf)

Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type. This method replaces any existing registered SerializerFactory DeserializerFactory instances.

Parameters
javaType:Class<T>

Class of the Java type

xmlType:QName

Qualified name of the XML data type

sf:SerializerFactory

SerializerFactory

dsf:DeserializerFactory

DeserializerFactory

Exceptions
JAXRPCException:
If any error during the registration
removeDeserializerback to summary
public void removeDeserializer(Class<T> javaType, QName xmlType)

Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.

Exceptions
JAXRPCException:
If there is error in removing the registered DeserializerFactory
removeSerializerback to summary
public void removeSerializer(Class<T> javaType, QName xmlType)

Removes the SerializerFactory registered for the specified pair of Java type and XML data type.

Exceptions
JAXRPCException:
If there is error in removing the registered SerializerFactory
setSupportedEncodingsback to summary
public void setSupportedEncodings(String[] encodingStyleURIs)

Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping that contains only encoding independent serializers and deserializers requires null as the parameter for this method.

Parameters
encodingStyleURIs:String[]

Array of encodingStyle URIs for the supported encoding styles