Package org.apache.axis.encoding
Class TypeMappingDelegate
java.lang.Object
org.apache.axis.encoding.TypeMappingDelegate
- All Implemented Interfaces:
Serializable
,TypeMapping
,TypeMapping
The TypeMapping delegate is used to simply delegate to
the indicated type mapping. It is used by the TypeMappingRegistry
to assist with chaining.
- Author:
- Rich Scheuerle (scheu@us.ibm.com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionClass[]
Returns an array of all the classes contained within this mappinggetClassForQName
(QName xmlType) Gets the Class mapped to QName.getClassForQName
(QName xmlType, Class javaType) Gets the Class mapped to QName, preferring the passed Class if possiblegetDeserializer
(Class javaType, QName xmlType) Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.getDeserializer
(Class javaType, QName xmlType, TypeMappingDelegate start) getDeserializer
(QName xmlType) Gets the DeserializerFactory registered for the specified XML data type.getNext()
getDelegate gets the new Delegate TypeMappinggetSerializer
(Class javaType) Gets the SerializerFactory registered for the specified pair of Java type and XML data type.getSerializer
(Class javaType, QName xmlType) Gets the SerializerFactory registered for the specified pair of Java type and XML data type.String[]
JAX-RPC Compliant Method DefinitionsgetTypeQName
(Class javaType) Gets the QName for the type mapped to Class.getTypeQNameExact
(Class javaType) Get the QName for this Java class, but only return a specific mapping if there is one.getXMLType
(Class javaType, QName xmlType, boolean encoded) Get the exact XML type QName which will be used when serializing a given Class to a given type QName.boolean
isRegistered
(Class javaType, QName xmlType) Checks whether or not type mapping between specified XML type and Java type is registered.void
register
(Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory dsf) always throws an exceptionvoid
removeDeserializer
(Class javaType, QName xmlType) Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.void
removeSerializer
(Class javaType, QName xmlType) Removes the SerializerFactory registered for the specified pair of Java type and XML data type.void
setDoAutoTypes
(boolean doAutoTypes) void
setNext
(TypeMappingDelegate next) setDelegate sets the new Delegate TypeMappingvoid
setSupportedEncodings
(String[] namespaceURIs) Sets the encodingStyle URIs supported by this TypeMapping instance.
-
Method Details
-
getSupportedEncodings
JAX-RPC Compliant Method Definitions- Specified by:
getSupportedEncodings
in interfaceTypeMapping
- Returns:
- Array of encodingStyle URIs for the supported encoding styles
-
setSupportedEncodings
Description copied from interface:TypeMapping
Sets the encodingStyle URIs supported by this TypeMapping instance. A TypeMapping that contains only encoding independent serializers and deserializers requiresnull
as the parameter for this method.- Specified by:
setSupportedEncodings
in interfaceTypeMapping
- Parameters:
namespaceURIs
- Array of encodingStyle URIs for the supported encoding styles
-
register
public void register(Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory dsf) throws JAXRPCException always throws an exception- Specified by:
register
in interfaceTypeMapping
- Parameters:
javaType
-xmlType
-sf
-dsf
-- Throws:
JAXRPCException
-
getSerializer
Description copied from interface:TypeMapping
Gets the SerializerFactory registered for the specified pair of Java type and XML data type.- Specified by:
getSerializer
in interfaceTypeMapping
- Parameters:
javaType
- Class of the Java typexmlType
- Qualified name of the XML data type- Returns:
- Registered SerializerFactory or
null
if there is no registered factory - Throws:
JAXRPCException
-
getSerializer
Description copied from interface:TypeMapping
Gets the SerializerFactory registered for the specified pair of Java type and XML data type.- Specified by:
getSerializer
in interfaceTypeMapping
- Parameters:
javaType
- - Class of the Java type- Returns:
- Registered SerializerFactory
- Throws:
JAXRPCException
- - If there is no registered SerializerFactory for this pair of Java type and XML data type java.lang.IllegalArgumentException If invalid or unsupported XML/Java type is specified
-
getDeserializer
Description copied from interface:TypeMapping
Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.- Specified by:
getDeserializer
in interfaceTypeMapping
- Parameters:
javaType
- Class of the Java typexmlType
- Qualified name of the XML data type- Returns:
- Registered SerializerFactory or
null
if there is no registered factory - Throws:
JAXRPCException
-
getDeserializer
public DeserializerFactory getDeserializer(Class javaType, QName xmlType, TypeMappingDelegate start) throws JAXRPCException - Throws:
JAXRPCException
-
getDeserializer
Description copied from interface:TypeMapping
Gets the DeserializerFactory registered for the specified XML data type.- Specified by:
getDeserializer
in interfaceTypeMapping
- Parameters:
xmlType
- - Qualified name of the XML data type- Returns:
- Registered DeserializerFactory
- Throws:
JAXRPCException
- - If there is no registered DeserializerFactory for this pair of Java type and XML data type java.lang.IllegalArgumentException - If invalid or unsupported XML/Java type is specified
-
removeSerializer
Description copied from interface:TypeMapping
Removes the SerializerFactory registered for the specified pair of Java type and XML data type.- Specified by:
removeSerializer
in interfaceTypeMapping
- Parameters:
javaType
- Class of the Java typexmlType
- Qualified name of the XML data type- Throws:
JAXRPCException
- if there is any error that prevents removal of the registered SerializerFactory
-
removeDeserializer
Description copied from interface:TypeMapping
Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.- Specified by:
removeDeserializer
in interfaceTypeMapping
- Parameters:
javaType
- Class of the Java typexmlType
- Qualified name of the XML data type- Throws:
JAXRPCException
- if there is any error in removing the registered DeserializerFactory
-
isRegistered
Description copied from interface:TypeMapping
Checks whether or not type mapping between specified XML type and Java type is registered.- Specified by:
isRegistered
in interfaceTypeMapping
- Parameters:
javaType
- Class of the Java typexmlType
- Qualified name of the XML data type- Returns:
- boolean;
true
if type mapping between the specified XML type and Java type is registered; otherwisefalse
-
getTypeQName
Gets the QName for the type mapped to Class.- Specified by:
getTypeQName
in interfaceTypeMapping
- Parameters:
javaType
- class or type- Returns:
- xmlType qname or null
-
getClassForQName
Gets the Class mapped to QName.- Specified by:
getClassForQName
in interfaceTypeMapping
- Parameters:
xmlType
- qname or null- Returns:
- javaType class for type or null for no mappingor delegate
-
getClassForQName
Gets the Class mapped to QName, preferring the passed Class if possible- Specified by:
getClassForQName
in interfaceTypeMapping
- Parameters:
xmlType
- qname or nulljavaType
- a Java class- Returns:
- javaType class for type or null for no mappingor delegate
-
getTypeQNameExact
Get the QName for this Java class, but only return a specific mapping if there is one. In other words, don't do special array processing, etc.- Specified by:
getTypeQNameExact
in interfaceTypeMapping
- Parameters:
javaType
-- Returns:
-
setNext
setDelegate sets the new Delegate TypeMapping -
getNext
getDelegate gets the new Delegate TypeMapping -
getAllClasses
Returns an array of all the classes contained within this mapping- Specified by:
getAllClasses
in interfaceTypeMapping
-
getXMLType
Get the exact XML type QName which will be used when serializing a given Class to a given type QName. In other words, if we have: Class TypeQName ---------------------- Base myNS:Base Child myNS:Child and call getXMLType(Child.class, BASE_QNAME), we should get CHILD_QNAME.- Specified by:
getXMLType
in interfaceTypeMapping
- Parameters:
javaType
-xmlType
-- Returns:
- the type's QName
- Throws:
JAXRPCException
-
setDoAutoTypes
public void setDoAutoTypes(boolean doAutoTypes)
-