Package org.apache.axis.encoding.ser

Examples of org.apache.axis.encoding.ser.DateDeserializerFactory


        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
View Full Code Here


        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
View Full Code Here

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE),
                   true);

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
View Full Code Here

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.sql.Date.class,
                   new DateSerializerFactory(java.sql.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.sql.Date.class,
                                               Constants.XSD_DATE)
        );

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
View Full Code Here

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
View Full Code Here

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.sql.Date.class,
                   new DateSerializerFactory(java.sql.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.sql.Date.class,
                                               Constants.XSD_DATE)
        );

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Time.class,
                                             Constants.XSD_TIME),
                   new SimpleDeserializerFactory(org.apache.axis.types.Time.class,
                                               Constants.XSD_TIME)
        );
        // These are the g* types (gYearMonth, etc) which map to Axis types
        myRegister(Constants.XSD_YEARMONTH, org.apache.axis.types.YearMonth.class,
                   new SimpleSerializerFactory(org.apache.axis.types.YearMonth.class,
                                             Constants.XSD_YEARMONTH),
                   new SimpleDeserializerFactory(org.apache.axis.types.YearMonth.class,
                                             Constants.XSD_YEARMONTH)
        );
        myRegister(Constants.XSD_YEAR, org.apache.axis.types.Year.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Year.class,
                                             Constants.XSD_YEAR),
                   new SimpleDeserializerFactory(org.apache.axis.types.Year.class,
                                             Constants.XSD_YEAR)
        );
        myRegister(Constants.XSD_MONTH, org.apache.axis.types.Month.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Month.class,
                                             Constants.XSD_MONTH),
                   new SimpleDeserializerFactory(org.apache.axis.types.Month.class,
                                             Constants.XSD_MONTH)
        );
        myRegister(Constants.XSD_DAY, org.apache.axis.types.Day.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Day.class,
                                             Constants.XSD_DAY),
                   new SimpleDeserializerFactory(org.apache.axis.types.Day.class,
                                             Constants.XSD_DAY)
        );
        myRegister(Constants.XSD_MONTHDAY, org.apache.axis.types.MonthDay.class,
                   new SimpleSerializerFactory(org.apache.axis.types.MonthDay.class,
                                             Constants.XSD_MONTHDAY),
                   new SimpleDeserializerFactory(org.apache.axis.types.MonthDay.class,
                                             Constants.XSD_MONTHDAY)
        );

        // Serialize all extensions of Map to SOAP_MAP
        // The SOAP_MAP will be deserialized into a HashMap by default.
        myRegister(Constants.SOAP_MAP,       java.util.HashMap.class,
                   new MapSerializerFactory(java.util.Map.class,
                                            Constants.SOAP_MAP),
                   new MapDeserializerFactory(java.util.HashMap.class,
                                              Constants.SOAP_MAP)
        );
        myRegister(Constants.SOAP_MAP,       java.util.Hashtable.class,
                   new MapSerializerFactory(java.util.Hashtable.class,
                                            Constants.SOAP_MAP),
                   null  // Make sure not to override the deser mapping
        );
        myRegister(Constants.SOAP_MAP,       java.util.Map.class,
                   new MapSerializerFactory(java.util.Map.class,
                                            Constants.SOAP_MAP),
                   null  // Make sure not to override the deser mapping
        );

        // Use the Element Serializeration for elements
        myRegister(Constants.SOAP_ELEMENT,   org.w3c.dom.Element.class,
                   new ElementSerializerFactory(),
                   new ElementDeserializerFactory());

        // Use the Document Serializeration for Document's
        myRegister(Constants.SOAP_DOCUMENT,   org.w3c.dom.Document.class,
                   new DocumentSerializerFactory(),
                   new DocumentDeserializerFactory());

        myRegister(Constants.SOAP_VECTOR,    java.util.Vector.class,
                   new VectorSerializerFactory(java.util.Vector.class,
                                               Constants.SOAP_VECTOR),
                   new VectorDeserializerFactory(java.util.Vector.class,
                                                 Constants.SOAP_VECTOR)
        );

        // Register all the supported MIME types
        // (note that MIME_PLAINTEXT was registered near the top)
        if (JavaUtils.isAttachmentSupported()) {
            myRegister(Constants.MIME_IMAGE, java.awt.Image.class,
                    new JAFDataHandlerSerializerFactory(
                            java.awt.Image.class,
                            Constants.MIME_IMAGE),
                    new JAFDataHandlerDeserializerFactory(
                            java.awt.Image.class,
                            Constants.MIME_IMAGE));
            myRegister(Constants.MIME_MULTIPART, javax.mail.internet.MimeMultipart.class,
                    new JAFDataHandlerSerializerFactory(
                            javax.mail.internet.MimeMultipart.class,
                            Constants.MIME_MULTIPART),
                    new JAFDataHandlerDeserializerFactory(
                            javax.mail.internet.MimeMultipart.class,
                            Constants.MIME_MULTIPART));
            myRegister(Constants.MIME_SOURCE, javax.xml.transform.Source.class,
                    new JAFDataHandlerSerializerFactory(
                            javax.xml.transform.Source.class,
                            Constants.MIME_SOURCE),
                    new JAFDataHandlerDeserializerFactory(
                            javax.xml.transform.Source.class,
                            Constants.MIME_SOURCE));
            myRegister(Constants.MIME_OCTETSTREAM, OctetStream.class,
                    new JAFDataHandlerSerializerFactory(
                            OctetStream.class,
                            Constants.MIME_OCTETSTREAM),
                    new JAFDataHandlerDeserializerFactory(
                            OctetStream.class,
                            Constants.MIME_OCTETSTREAM));
            myRegister(Constants.MIME_DATA_HANDLER, javax.activation.DataHandler.class,
                    new JAFDataHandlerSerializerFactory(),
                    new JAFDataHandlerDeserializerFactory());
        }

        // xsd:token
        myRegister(Constants.XSD_TOKEN, org.apache.axis.types.Token.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Token.class,
                                             Constants.XSD_TOKEN),
                   new SimpleDeserializerFactory(org.apache.axis.types.Token.class,
                                             Constants.XSD_TOKEN)
        );

        // a xsd:normalizedString
        myRegister(Constants.XSD_NORMALIZEDSTRING, org.apache.axis.types.NormalizedString.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NormalizedString.class,
                                             Constants.XSD_NORMALIZEDSTRING),
                   new SimpleDeserializerFactory(org.apache.axis.types.NormalizedString.class,
                                             Constants.XSD_NORMALIZEDSTRING)
        );

        // a xsd:unsignedLong
        myRegister(Constants.XSD_UNSIGNEDLONG, org.apache.axis.types.UnsignedLong.class,
             new SimpleSerializerFactory(org.apache.axis.types.UnsignedLong.class,
                                                  Constants.XSD_UNSIGNEDLONG),
             new SimpleDeserializerFactory(org.apache.axis.types.UnsignedLong.class,
                                           Constants.XSD_UNSIGNEDLONG)
        );

        // a xsd:unsignedInt
        myRegister(Constants.XSD_UNSIGNEDINT, org.apache.axis.types.UnsignedInt.class,
             new SimpleSerializerFactory(org.apache.axis.types.UnsignedInt.class,
                                                  Constants.XSD_UNSIGNEDINT),
             new SimpleDeserializerFactory(org.apache.axis.types.UnsignedInt.class,
                                           Constants.XSD_UNSIGNEDINT)
        );

        // a xsd:unsignedShort
        myRegister(Constants.XSD_UNSIGNEDSHORT, org.apache.axis.types.UnsignedShort.class,
             new SimpleSerializerFactory(org.apache.axis.types.UnsignedShort.class,
                                                  Constants.XSD_UNSIGNEDSHORT),
             new SimpleDeserializerFactory(org.apache.axis.types.UnsignedShort.class,
                                           Constants.XSD_UNSIGNEDSHORT)
        );

        // a xsd:unsignedByte
        myRegister(Constants.XSD_UNSIGNEDBYTE, org.apache.axis.types.UnsignedByte.class,
                   new SimpleSerializerFactory(org.apache.axis.types.UnsignedByte.class,
                                             Constants.XSD_UNSIGNEDBYTE),
                   new SimpleDeserializerFactory(org.apache.axis.types.UnsignedByte.class,
                                             Constants.XSD_UNSIGNEDBYTE)
        );

        // a xsd:nonNegativeInteger
        myRegister(Constants.XSD_NONNEGATIVEINTEGER, org.apache.axis.types.NonNegativeInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.NonNegativeInteger.class,
                                                  Constants.XSD_NONNEGATIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.NonNegativeInteger.class,
                                           Constants.XSD_NONNEGATIVEINTEGER)
        );

        // a xsd:negativeInteger
        myRegister(Constants.XSD_NEGATIVEINTEGER, org.apache.axis.types.NegativeInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.NegativeInteger.class,
                                                  Constants.XSD_NEGATIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.NegativeInteger.class,
                                           Constants.XSD_NEGATIVEINTEGER)
        );

        // a xsd:positiveInteger
        myRegister(Constants.XSD_POSITIVEINTEGER, org.apache.axis.types.PositiveInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.PositiveInteger.class,
                                                  Constants.XSD_POSITIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.PositiveInteger.class,
                                           Constants.XSD_POSITIVEINTEGER)
        );

        // a xsd:nonPositiveInteger
        myRegister(Constants.XSD_NONPOSITIVEINTEGER, org.apache.axis.types.NonPositiveInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.NonPositiveInteger.class,
                                                  Constants.XSD_NONPOSITIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.NonPositiveInteger.class,
                                           Constants.XSD_NONPOSITIVEINTEGER)
        );

        // a xsd:Name
        myRegister(Constants.XSD_NAME, org.apache.axis.types.Name.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Name.class,
                                             Constants.XSD_NAME),
                   new SimpleDeserializerFactory(org.apache.axis.types.Name.class,
                                             Constants.XSD_NAME)
        );

        // a xsd:NCName
        myRegister(Constants.XSD_NCNAME, org.apache.axis.types.NCName.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NCName.class,
                                             Constants.XSD_NCNAME),
                   new SimpleDeserializerFactory(org.apache.axis.types.NCName.class,
                                             Constants.XSD_NCNAME)
        );

         // a xsd:ID
        myRegister(Constants.XSD_ID, org.apache.axis.types.Id.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Id.class,
                                             Constants.XSD_ID),
                   new SimpleDeserializerFactory(org.apache.axis.types.Id.class,
                                             Constants.XSD_ID)
        );

        // a xml:lang
        myRegister(Constants.XML_LANG, org.apache.axis.types.Language.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XML_LANG),
                   new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XML_LANG)
        );
       
        // a xsd:language
        myRegister(Constants.XSD_LANGUAGE, org.apache.axis.types.Language.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XSD_LANGUAGE),
                   new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XSD_LANGUAGE)
        );

        // a xsd:NmToken
        myRegister(Constants.XSD_NMTOKEN, org.apache.axis.types.NMToken.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NMToken.class,
                                             Constants.XSD_NMTOKEN),
                   new SimpleDeserializerFactory(org.apache.axis.types.NMToken.class,
                                             Constants.XSD_NMTOKEN)
        );

        // a xsd:NmTokens
        myRegister(Constants.XSD_NMTOKENS, org.apache.axis.types.NMTokens.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NMTokens.class,
                                             Constants.XSD_NMTOKENS),
                   new SimpleDeserializerFactory(org.apache.axis.types.NMTokens.class,
                                             Constants.XSD_NMTOKENS)
        );

        // a xsd:NOTATION
        myRegister(Constants.XSD_NOTATION, org.apache.axis.types.Notation.class,
                   new BeanSerializerFactory(org.apache.axis.types.Notation.class,
                                             Constants.XSD_NOTATION),
                   new BeanDeserializerFactory(org.apache.axis.types.Notation.class,
                                             Constants.XSD_NOTATION)
        );

        // a xsd:XSD_ENTITY
        myRegister(Constants.XSD_ENTITY, org.apache.axis.types.Entity.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Entity.class,
                                             Constants.XSD_ENTITY),
                   new SimpleDeserializerFactory(org.apache.axis.types.Entity.class,
                                             Constants.XSD_ENTITY)
        );

        // a xsd:XSD_ENTITIES
        myRegister(Constants.XSD_ENTITIES, org.apache.axis.types.Entities.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Entities.class,
                                             Constants.XSD_ENTITIES),
                   new SimpleDeserializerFactory(org.apache.axis.types.Entities.class,
                                             Constants.XSD_ENTITIES)
        );

        // a xsd:XSD_IDREF
        myRegister(Constants.XSD_IDREF, org.apache.axis.types.IDRef.class,
                   new SimpleSerializerFactory(org.apache.axis.types.IDRef.class,
                                             Constants.XSD_IDREF),
                   new SimpleDeserializerFactory(org.apache.axis.types.IDRef.class,
                                             Constants.XSD_IDREF)
        );

        // a xsd:XSD_XSD_IDREFS
        myRegister(Constants.XSD_IDREFS, org.apache.axis.types.IDRefs.class,
                   new SimpleSerializerFactory(org.apache.axis.types.IDRefs.class,
                                             Constants.XSD_IDREFS),
                   new SimpleDeserializerFactory(org.apache.axis.types.IDRefs.class,
                                             Constants.XSD_IDREFS)
        );
       
        // a xsd:Duration
        myRegister(Constants.XSD_DURATION, org.apache.axis.types.Duration.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Duration.class,
                                             Constants.XSD_DURATION),
                   new SimpleDeserializerFactory(org.apache.axis.types.Duration.class,
                                             Constants.XSD_DURATION)
        );
       
        // a xsd:anyURI
        myRegister(Constants.XSD_ANYURI, org.apache.axis.types.URI.class,
                   new SimpleSerializerFactory(org.apache.axis.types.URI.class,
                                             Constants.XSD_ANYURI),
                   new SimpleDeserializerFactory(org.apache.axis.types.URI.class,
                                             Constants.XSD_ANYURI)
        );

        // a xsd:schema
        myRegister(Constants.XSD_SCHEMA, org.apache.axis.types.Schema.class,
                   new BeanSerializerFactory(org.apache.axis.types.Schema.class,
                                             Constants.XSD_SCHEMA),
                   new BeanDeserializerFactory(org.apache.axis.types.Schema.class,
                                             Constants.XSD_SCHEMA)
        );
       
        if (jaxrpc11Compliance) {
            // Table 4-1 of the JAXRPC 1.1 spec
            myRegisterSimple(Constants.XSD_UNSIGNEDINT, long.class);   
            myRegisterSimple(Constants.XSD_UNSIGNEDSHORT, int.class);   
            myRegisterSimple(Constants.XSD_UNSIGNEDBYTE, short.class);  
            myRegister(Constants.XSD_DATETIME,       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_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 DateSerializerFactory(java.util.Calendar.class,
                                                 Constants.XSD_TIME),
                       new DateDeserializerFactory(java.util.Calendar.class,
                                                   Constants.XSD_TIME)
            );
            try {
                myRegisterSimple(Constants.XSD_ANYURI, Class.forName("java.net.URI"));
            }
View Full Code Here

                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,
View Full Code Here

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.sql.Date.class,
                   new DateSerializerFactory(java.sql.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.sql.Date.class,
                                               Constants.XSD_DATE)
        );

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
View Full Code Here

        // XSD_DATE is the current one, which is why it is
        // registered after the other two
        myRegister(Constants.XSD_DATE2,      java.util.Date.class,                          
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE2),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE2),
                   true);
        myRegister(Constants.XSD_DATE3,      java.util.Date.class,                          
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE3),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE3),
                   true);
        myRegister(Constants.XSD_DATE1,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE1),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE1),
                   true);
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE),
                   true);

        // Serialize all extensions of Map to SOAP_MAP
        // The SOAP_MAP will be deserialized into a HashMap by default.
View Full Code Here

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.sql.Date.class,
                   new DateSerializerFactory(java.sql.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.sql.Date.class,
                                               Constants.XSD_DATE)
        );

        // See the SchemaVersion classes for where the registration of
        // dateTime (for 2001) and timeInstant (for 1999 & 2000) happen.
        myRegister(Constants.XSD_DATE,       java.util.Date.class,
                   new DateSerializerFactory(java.util.Date.class,
                                             Constants.XSD_DATE),
                   new DateDeserializerFactory(java.util.Date.class,
                                               Constants.XSD_DATE)
        );

        // Mapping for xsd:time.  Map to Axis type Time
        myRegister(Constants.XSD_TIME,       org.apache.axis.types.Time.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Time.class,
                                             Constants.XSD_TIME),
                   new SimpleDeserializerFactory(org.apache.axis.types.Time.class,
                                               Constants.XSD_TIME)
        );
        // These are the g* types (gYearMonth, etc) which map to Axis types
        myRegister(Constants.XSD_YEARMONTH, org.apache.axis.types.YearMonth.class,
                   new SimpleSerializerFactory(org.apache.axis.types.YearMonth.class,
                                             Constants.XSD_YEARMONTH),
                   new SimpleDeserializerFactory(org.apache.axis.types.YearMonth.class,
                                             Constants.XSD_YEARMONTH)
        );
        myRegister(Constants.XSD_YEAR, org.apache.axis.types.Year.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Year.class,
                                             Constants.XSD_YEAR),
                   new SimpleDeserializerFactory(org.apache.axis.types.Year.class,
                                             Constants.XSD_YEAR)
        );
        myRegister(Constants.XSD_MONTH, org.apache.axis.types.Month.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Month.class,
                                             Constants.XSD_MONTH),
                   new SimpleDeserializerFactory(org.apache.axis.types.Month.class,
                                             Constants.XSD_MONTH)
        );
        myRegister(Constants.XSD_DAY, org.apache.axis.types.Day.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Day.class,
                                             Constants.XSD_DAY),
                   new SimpleDeserializerFactory(org.apache.axis.types.Day.class,
                                             Constants.XSD_DAY)
        );
        myRegister(Constants.XSD_MONTHDAY, org.apache.axis.types.MonthDay.class,
                   new SimpleSerializerFactory(org.apache.axis.types.MonthDay.class,
                                             Constants.XSD_MONTHDAY),
                   new SimpleDeserializerFactory(org.apache.axis.types.MonthDay.class,
                                             Constants.XSD_MONTHDAY)
        );

        // Serialize all extensions of Map to SOAP_MAP
        // Order counts here, HashMap should be last.
        myRegister(Constants.SOAP_MAP,       java.util.Hashtable.class,
                   new MapSerializerFactory(java.util.Hashtable.class,
                                            Constants.SOAP_MAP),
                   null  // Make sure not to override the deser mapping
        );
        myRegister(Constants.SOAP_MAP,       java.util.Map.class,
                   new MapSerializerFactory(java.util.Map.class,
                                            Constants.SOAP_MAP),
                   null  // Make sure not to override the deser mapping
        );
        // The SOAP_MAP will be deserialized into a HashMap by default.
        myRegister(Constants.SOAP_MAP,       java.util.HashMap.class,
                   new MapSerializerFactory(java.util.Map.class,
                                            Constants.SOAP_MAP),
                   new MapDeserializerFactory(java.util.HashMap.class,
                                              Constants.SOAP_MAP)
        );

        // Use the Element Serializeration for elements
        myRegister(Constants.SOAP_ELEMENT,   org.w3c.dom.Element.class,
                   new ElementSerializerFactory(),
                   new ElementDeserializerFactory());

        // Use the Document Serializeration for Document's
        myRegister(Constants.SOAP_DOCUMENT,   org.w3c.dom.Document.class,
                   new DocumentSerializerFactory(),
                   new DocumentDeserializerFactory());

        myRegister(Constants.SOAP_VECTOR,    java.util.Vector.class,
                   new VectorSerializerFactory(java.util.Vector.class,
                                               Constants.SOAP_VECTOR),
                   new VectorDeserializerFactory(java.util.Vector.class,
                                                 Constants.SOAP_VECTOR)
        );

        // Register all the supported MIME types
        // (note that MIME_PLAINTEXT was registered near the top)
        if (JavaUtils.isAttachmentSupported()) {
            myRegister(Constants.MIME_IMAGE, java.awt.Image.class,
                    new JAFDataHandlerSerializerFactory(
                            java.awt.Image.class,
                            Constants.MIME_IMAGE),
                    new JAFDataHandlerDeserializerFactory(
                            java.awt.Image.class,
                            Constants.MIME_IMAGE));
            myRegister(Constants.MIME_MULTIPART, javax.mail.internet.MimeMultipart.class,
                    new JAFDataHandlerSerializerFactory(
                            javax.mail.internet.MimeMultipart.class,
                            Constants.MIME_MULTIPART),
                    new JAFDataHandlerDeserializerFactory(
                            javax.mail.internet.MimeMultipart.class,
                            Constants.MIME_MULTIPART));
            myRegister(Constants.MIME_SOURCE, javax.xml.transform.Source.class,
                    new JAFDataHandlerSerializerFactory(
                            javax.xml.transform.Source.class,
                            Constants.MIME_SOURCE),
                    new JAFDataHandlerDeserializerFactory(
                            javax.xml.transform.Source.class,
                            Constants.MIME_SOURCE));
            myRegister(Constants.MIME_OCTETSTREAM, OctetStream.class,
                    new JAFDataHandlerSerializerFactory(
                            OctetStream.class,
                            Constants.MIME_OCTETSTREAM),
                    new JAFDataHandlerDeserializerFactory(
                            OctetStream.class,
                            Constants.MIME_OCTETSTREAM));
            myRegister(Constants.MIME_DATA_HANDLER, javax.activation.DataHandler.class,
                    new JAFDataHandlerSerializerFactory(),
                    new JAFDataHandlerDeserializerFactory());
        }

        // xsd:token
        myRegister(Constants.XSD_TOKEN, org.apache.axis.types.Token.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Token.class,
                                             Constants.XSD_TOKEN),
                   new SimpleDeserializerFactory(org.apache.axis.types.Token.class,
                                             Constants.XSD_TOKEN)
        );

        // a xsd:normalizedString
        myRegister(Constants.XSD_NORMALIZEDSTRING, org.apache.axis.types.NormalizedString.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NormalizedString.class,
                                             Constants.XSD_NORMALIZEDSTRING),
                   new SimpleDeserializerFactory(org.apache.axis.types.NormalizedString.class,
                                             Constants.XSD_NORMALIZEDSTRING)
        );

        // a xsd:unsignedLong
        myRegister(Constants.XSD_UNSIGNEDLONG, org.apache.axis.types.UnsignedLong.class,
             new SimpleSerializerFactory(org.apache.axis.types.UnsignedLong.class,
                                                  Constants.XSD_UNSIGNEDLONG),
             new SimpleDeserializerFactory(org.apache.axis.types.UnsignedLong.class,
                                           Constants.XSD_UNSIGNEDLONG)
        );

        // a xsd:unsignedInt
        myRegister(Constants.XSD_UNSIGNEDINT, org.apache.axis.types.UnsignedInt.class,
             new SimpleSerializerFactory(org.apache.axis.types.UnsignedInt.class,
                                                  Constants.XSD_UNSIGNEDINT),
             new SimpleDeserializerFactory(org.apache.axis.types.UnsignedInt.class,
                                           Constants.XSD_UNSIGNEDINT)
        );

        // a xsd:unsignedShort
        myRegister(Constants.XSD_UNSIGNEDSHORT, org.apache.axis.types.UnsignedShort.class,
             new SimpleSerializerFactory(org.apache.axis.types.UnsignedShort.class,
                                                  Constants.XSD_UNSIGNEDSHORT),
             new SimpleDeserializerFactory(org.apache.axis.types.UnsignedShort.class,
                                           Constants.XSD_UNSIGNEDSHORT)
        );

        // a xsd:unsignedByte
        myRegister(Constants.XSD_UNSIGNEDBYTE, org.apache.axis.types.UnsignedByte.class,
                   new SimpleSerializerFactory(org.apache.axis.types.UnsignedByte.class,
                                             Constants.XSD_UNSIGNEDBYTE),
                   new SimpleDeserializerFactory(org.apache.axis.types.UnsignedByte.class,
                                             Constants.XSD_UNSIGNEDBYTE)
        );

        // a xsd:nonNegativeInteger
        myRegister(Constants.XSD_NONNEGATIVEINTEGER, org.apache.axis.types.NonNegativeInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.NonNegativeInteger.class,
                                                  Constants.XSD_NONNEGATIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.NonNegativeInteger.class,
                                           Constants.XSD_NONNEGATIVEINTEGER)
        );

        // a xsd:negativeInteger
        myRegister(Constants.XSD_NEGATIVEINTEGER, org.apache.axis.types.NegativeInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.NegativeInteger.class,
                                                  Constants.XSD_NEGATIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.NegativeInteger.class,
                                           Constants.XSD_NEGATIVEINTEGER)
        );

        // a xsd:positiveInteger
        myRegister(Constants.XSD_POSITIVEINTEGER, org.apache.axis.types.PositiveInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.PositiveInteger.class,
                                                  Constants.XSD_POSITIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.PositiveInteger.class,
                                           Constants.XSD_POSITIVEINTEGER)
        );

        // a xsd:nonPositiveInteger
        myRegister(Constants.XSD_NONPOSITIVEINTEGER, org.apache.axis.types.NonPositiveInteger.class,
             new SimpleSerializerFactory(org.apache.axis.types.NonPositiveInteger.class,
                                                  Constants.XSD_NONPOSITIVEINTEGER),
             new SimpleDeserializerFactory(org.apache.axis.types.NonPositiveInteger.class,
                                           Constants.XSD_NONPOSITIVEINTEGER)
        );

        // a xsd:Name
        myRegister(Constants.XSD_NAME, org.apache.axis.types.Name.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Name.class,
                                             Constants.XSD_NAME),
                   new SimpleDeserializerFactory(org.apache.axis.types.Name.class,
                                             Constants.XSD_NAME)
        );

        // a xsd:NCName
        myRegister(Constants.XSD_NCNAME, org.apache.axis.types.NCName.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NCName.class,
                                             Constants.XSD_NCNAME),
                   new SimpleDeserializerFactory(org.apache.axis.types.NCName.class,
                                             Constants.XSD_NCNAME)
        );

         // a xsd:ID
        myRegister(Constants.XSD_ID, org.apache.axis.types.Id.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Id.class,
                                             Constants.XSD_ID),
                   new SimpleDeserializerFactory(org.apache.axis.types.Id.class,
                                             Constants.XSD_ID)
        );

        // a xml:lang
        myRegister(Constants.XML_LANG, org.apache.axis.types.Language.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XML_LANG),
                   new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XML_LANG)
        );
       
        // a xsd:language
        myRegister(Constants.XSD_LANGUAGE, org.apache.axis.types.Language.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XSD_LANGUAGE),
                   new SimpleDeserializerFactory(org.apache.axis.types.Language.class,
                                             Constants.XSD_LANGUAGE)
        );

        // a xsd:NmToken
        myRegister(Constants.XSD_NMTOKEN, org.apache.axis.types.NMToken.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NMToken.class,
                                             Constants.XSD_NMTOKEN),
                   new SimpleDeserializerFactory(org.apache.axis.types.NMToken.class,
                                             Constants.XSD_NMTOKEN)
        );

        // a xsd:NmTokens
        myRegister(Constants.XSD_NMTOKENS, org.apache.axis.types.NMTokens.class,
                   new SimpleSerializerFactory(org.apache.axis.types.NMTokens.class,
                                             Constants.XSD_NMTOKENS),
                   new SimpleDeserializerFactory(org.apache.axis.types.NMTokens.class,
                                             Constants.XSD_NMTOKENS)
        );

        // a xsd:NOTATION
        myRegister(Constants.XSD_NOTATION, org.apache.axis.types.Notation.class,
                   new BeanSerializerFactory(org.apache.axis.types.Notation.class,
                                             Constants.XSD_NOTATION),
                   new BeanDeserializerFactory(org.apache.axis.types.Notation.class,
                                             Constants.XSD_NOTATION)
        );

        // a xsd:XSD_ENTITY
        myRegister(Constants.XSD_ENTITY, org.apache.axis.types.Entity.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Entity.class,
                                             Constants.XSD_ENTITY),
                   new SimpleDeserializerFactory(org.apache.axis.types.Entity.class,
                                             Constants.XSD_ENTITY)
        );

        // a xsd:XSD_ENTITIES
        myRegister(Constants.XSD_ENTITIES, org.apache.axis.types.Entities.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Entities.class,
                                             Constants.XSD_ENTITIES),
                   new SimpleDeserializerFactory(org.apache.axis.types.Entities.class,
                                             Constants.XSD_ENTITIES)
        );

        // a xsd:XSD_IDREF
        myRegister(Constants.XSD_IDREF, org.apache.axis.types.IDRef.class,
                   new SimpleSerializerFactory(org.apache.axis.types.IDRef.class,
                                             Constants.XSD_IDREF),
                   new SimpleDeserializerFactory(org.apache.axis.types.IDRef.class,
                                             Constants.XSD_IDREF)
        );

        // a xsd:XSD_XSD_IDREFS
        myRegister(Constants.XSD_IDREFS, org.apache.axis.types.IDRefs.class,
                   new SimpleSerializerFactory(org.apache.axis.types.IDRefs.class,
                                             Constants.XSD_IDREFS),
                   new SimpleDeserializerFactory(org.apache.axis.types.IDRefs.class,
                                             Constants.XSD_IDREFS)
        );
       
        // a xsd:Duration
        myRegister(Constants.XSD_DURATION, org.apache.axis.types.Duration.class,
                   new SimpleSerializerFactory(org.apache.axis.types.Duration.class,
                                             Constants.XSD_DURATION),
                   new SimpleDeserializerFactory(org.apache.axis.types.Duration.class,
                                             Constants.XSD_DURATION)
        );
       
        // a xsd:anyURI
        myRegister(Constants.XSD_ANYURI, org.apache.axis.types.URI.class,
                   new SimpleSerializerFactory(org.apache.axis.types.URI.class,
                                             Constants.XSD_ANYURI),
                   new SimpleDeserializerFactory(org.apache.axis.types.URI.class,
                                             Constants.XSD_ANYURI)
        );

        // a xsd:schema
        myRegister(Constants.XSD_SCHEMA, org.apache.axis.types.Schema.class,
                   new BeanSerializerFactory(org.apache.axis.types.Schema.class,
                                             Constants.XSD_SCHEMA),
                   new BeanDeserializerFactory(org.apache.axis.types.Schema.class,
                                             Constants.XSD_SCHEMA)
        );
       
        if (jaxrpc11Compliance || dojaxrpc11) {
            // Table 4-1 of the JAXRPC 1.1 spec
            myRegisterSimple(Constants.XSD_UNSIGNEDINT, long.class);   
            myRegisterSimple(Constants.XSD_UNSIGNEDSHORT, int.class);   
            myRegisterSimple(Constants.XSD_UNSIGNEDBYTE, short.class);  
            myRegister(Constants.XSD_DATETIME,       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_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 DateSerializerFactory(java.util.Calendar.class,
                                                 Constants.XSD_TIME),
                       new DateDeserializerFactory(java.util.Calendar.class,
                                                   Constants.XSD_TIME)
            );
            try {
                myRegisterSimple(Constants.XSD_ANYURI, Class.forName("java.net.URI"));
            }
View Full Code Here

TOP

Related Classes of org.apache.axis.encoding.ser.DateDeserializerFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.