javax.xml.rpc.encoding
Interface TypeMapping


public interface TypeMapping

The javax.xml.rpc.encoding.TypeMapping is the base interface for representation of a type mapping. A TypeMapping implementation class may support one or more encoding styles and XML schema namespaces. For its supported encoding styles and XML schema namespaces, a TypeMapping instance maintains a set of tuples of the type {Java type, SerializerFactory, DeserializerFactory, XML data type}.

Version:
0.1

Method Summary
 DeserializerFactory getDeserializer(java.lang.Class javaType, QName xmlType)
          Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.
 SerializerFactory getSerializer(java.lang.Class javaType, QName xmlType)
          Gets the SerializerFactory registered for the specified pair of Java type and XML data type.
 java.util.Iterator getSupportedEncodings()
          Gets the list of encoding styles supported by this TypeMapping object.
 void register(java.lang.Class javaType, QName xmlType, SerializerFactory sf, DeserializerFactory dsf)
          Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type.
 void removeDeserializer(java.lang.Class javaType, QName xmlType)
          Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.
 void removeSerializer(java.lang.Class javaType, QName xmlType)
          Removes the SerializerFactory registered for the specified pair of Java type and XML data type.
 

Method Detail

getSupportedEncodings

public java.util.Iterator getSupportedEncodings()
Gets the list of encoding styles supported by this TypeMapping object.
Returns:
Iterator for the list of namespace URIs for the supported encoding styles and XML schema namespaces.

register

public void register(java.lang.Class javaType,
                     QName xmlType,
                     SerializerFactory sf,
                     DeserializerFactory dsf)
              throws JAXRPCException
Registers SerializerFactory and DeserializerFactory for a specific type mapping between an XML type and Java type.
Parameters:
javaType - - Class of the Java type
xmlType - - Qualified name of the XML data type
sf - - SerializerFactory
dsf - - DeserializerFactory
Throws:
JAXRPCException - - If any error during the registration

getSerializer

public SerializerFactory getSerializer(java.lang.Class javaType,
                                       QName xmlType)
                                throws JAXRPCException
Gets the SerializerFactory registered for the specified pair of Java type and XML data type.
Parameters:
javaType - - Class of the Java type
xmlType - - Qualified name of the XML data 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

public DeserializerFactory getDeserializer(java.lang.Class javaType,
                                           QName xmlType)
                                    throws JAXRPCException
Gets the DeserializerFactory registered for the specified pair of Java type and XML data type.
Parameters:
javaType - - Class of the Java type
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

public void removeSerializer(java.lang.Class javaType,
                             QName xmlType)
                      throws JAXRPCException
Removes the SerializerFactory registered for the specified pair of Java type and XML data type.
Parameters:
javaType - - Class of the Java type
xmlType - - Qualified name of the XML data type
Throws:
JAXRPCException - - If there is error in removing the registered SerializerFactory java.lang.IllegalArgumentException - If invalid or unsupported XML/Java type is specified

removeDeserializer

public void removeDeserializer(java.lang.Class javaType,
                               QName xmlType)
                        throws JAXRPCException
Removes the DeserializerFactory registered for the specified pair of Java type and XML data type.
Parameters:
javaType - - Class of the Java type
xmlType - - Qualified name of the XML data type
Throws:
JAXRPCException - - If there is error in removing the registered DeserializerFactory java.lang.IllegalArgumentException - If invalid or unsupported XML/Java type is specified


Copyright © 2001 Apache XML Project. All Rights Reserved.