javax.xml.rpc.encoding
Interface TypeMapping

All Known Subinterfaces:
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.6

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.lang.String[] getSupportedNamespaces()
          Gets the list of encoding styles supported by this TypeMapping.
 boolean isRegistered(java.lang.Class javaType, QName xmlType)
          isRegistered returns true if the [javaType, xmlType] pair is registered.
 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.
 void setSupportedNamespaces(java.lang.String[] namespaceURIs)
          Sets the list of encoding styles supported by this TypeMapping.
 

Method Detail

getSupportedNamespaces

public java.lang.String[] getSupportedNamespaces()
Gets the list of encoding styles supported by this TypeMapping.
Returns:
String[] of namespace URIs for the supported encoding styles and XML schema namespaces.

setSupportedNamespaces

public void setSupportedNamespaces(java.lang.String[] namespaceURIs)
Sets the list of encoding styles supported by this TypeMapping.
Parameters:
namespaceURIs - String[] of namespace URI's

isRegistered

public boolean isRegistered(java.lang.Class javaType,
                            QName xmlType)
isRegistered returns true if the [javaType, xmlType] pair is registered.
Parameters:
javaType - - Class of the Java type
xmlType - - Qualified name of the XML data type

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.