FileDocCategorySizeDatePackage
DefaultJAXRPC11TypeMappingImpl.javaAPI DocApache Axis 1.45047Sat Apr 22 18:57:28 BST 2006org.apache.axis.encoding

DefaultJAXRPC11TypeMappingImpl

public class DefaultJAXRPC11TypeMappingImpl extends DefaultTypeMappingImpl
This is the implementation of the axis Default JAX-RPC SOAP Encoding TypeMapping See DefaultTypeMapping for more information.

Fields Summary
private static DefaultJAXRPC11TypeMappingImpl
tm
Constructors Summary
protected DefaultJAXRPC11TypeMappingImpl()

        registerXSDTypes();
    
Methods Summary
public static synchronized TypeMappingImplgetSingleton()
Obtain the singleton default typemapping.


              
         
        if (tm == null) {
            tm = new DefaultJAXRPC11TypeMappingImpl();
        }
        return tm;
    
private voidregisterXSDTypes()
Register the XSD data types in JAXRPC11 spec.

        // Table 4-1 of the JAXRPC 1.1 spec
        myRegisterSimple(Constants.XSD_UNSIGNEDINT, Long.class);
        myRegisterSimple(Constants.XSD_UNSIGNEDINT, long.class);
        myRegisterSimple(Constants.XSD_UNSIGNEDSHORT, Integer.class);
        myRegisterSimple(Constants.XSD_UNSIGNEDSHORT, int.class);
        myRegisterSimple(Constants.XSD_UNSIGNEDBYTE, Short.class);
        myRegisterSimple(Constants.XSD_UNSIGNEDBYTE, short.class);
        myRegister(Constants.XSD_DATETIME, java.util.Calendar.class,
                new CalendarSerializerFactory(java.util.Calendar.class,
                        Constants.XSD_DATETIME),
                new CalendarDeserializerFactory(java.util.Calendar.class,
                        Constants.XSD_DATETIME));
        myRegister(Constants.XSD_DATE, java.util.Calendar.class,
                new DateSerializerFactory(java.util.Calendar.class,
                        Constants.XSD_DATE),
                new DateDeserializerFactory(java.util.Calendar.class,
                        Constants.XSD_DATE));
        myRegister(Constants.XSD_TIME, java.util.Calendar.class,
                new TimeSerializerFactory(java.util.Calendar.class,
                        Constants.XSD_TIME),
                new TimeDeserializerFactory(java.util.Calendar.class,
                        Constants.XSD_TIME));
        try {
            myRegisterSimple(Constants.XSD_ANYURI,
                    Class.forName("java.net.URI"));
        } catch (ClassNotFoundException e) {
            myRegisterSimple(Constants.XSD_ANYURI, java.lang.String.class);
        }
            
        // Table 4-2 of JAXRPC 1.1 spec
        myRegisterSimple(Constants.XSD_DURATION, java.lang.String.class);
        myRegisterSimple(Constants.XSD_YEARMONTH, java.lang.String.class);
        myRegisterSimple(Constants.XSD_YEAR, java.lang.String.class);
        myRegisterSimple(Constants.XSD_MONTHDAY, java.lang.String.class);
        myRegisterSimple(Constants.XSD_DAY, java.lang.String.class);
        myRegisterSimple(Constants.XSD_MONTH, java.lang.String.class);
        myRegisterSimple(Constants.XSD_NORMALIZEDSTRING,
                java.lang.String.class);
        myRegisterSimple(Constants.XSD_TOKEN, java.lang.String.class);
        myRegisterSimple(Constants.XSD_LANGUAGE, java.lang.String.class);
        myRegisterSimple(Constants.XSD_NAME, java.lang.String.class);
        myRegisterSimple(Constants.XSD_NCNAME, java.lang.String.class);
        myRegisterSimple(Constants.XSD_ID, java.lang.String.class);
        myRegisterSimple(Constants.XSD_NMTOKEN, java.lang.String.class);
        myRegisterSimple(Constants.XSD_NMTOKENS, java.lang.String.class);
        myRegisterSimple(Constants.XSD_STRING, java.lang.String.class);
        myRegisterSimple(Constants.XSD_NONPOSITIVEINTEGER,
                java.math.BigInteger.class);
        myRegisterSimple(Constants.XSD_NEGATIVEINTEGER,
                java.math.BigInteger.class);
        myRegisterSimple(Constants.XSD_NONNEGATIVEINTEGER,
                java.math.BigInteger.class);
        myRegisterSimple(Constants.XSD_UNSIGNEDLONG,
                java.math.BigInteger.class);
        myRegisterSimple(Constants.XSD_POSITIVEINTEGER,
                java.math.BigInteger.class);