You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Russell Butek <bu...@us.ibm.com> on 2002/03/05 15:28:59 UTC

date vs dateTime (was: cvs commit: xml-axis/java/src/org/apache/axis/encoding DefaultTypeMappingImpl.java)

WARNING!!  WARNING!!

You've just broken WSDL->Java->WSDL roundtripping!

WSDL date -> Java Date -> WSDL dateTime.

Last week at the interop meetings we've discovered that we really need
WSDL->Java->WSDL roundtripping for the round III group D tests.  You've
introduced a case where a group D scenario won't work.

I'm not saying we shouldn't support date (breaking round tripping isn't as
bad as not working at all), but we MUST be VERY aware of the hole we're
digging for ourselves.

Russell Butek
butek@us.ibm.com
---------------------- Forwarded by Russell Butek/Austin/IBM on 03/05/2002
08:26 AM ---------------------------





dims@apache.org on 03/05/2002 08:19:57 AM

Please respond to axis-dev@xml.apache.org

To:    xml-axis-cvs@apache.org
cc:

Subject:    cvs commit: xml-axis/java/src/org/apache/axis/encoding
       DefaultTypeMappingImpl.java




dims        02/03/05 06:19:57

  Modified:    java/src/org/apache/axis Constants.java
               java/src/org/apache/axis/encoding
                        DefaultTypeMappingImpl.java
  Log:
  adding support for "http://www.w3.org/2001/XMLSchema:date". "date" is a
  perfectly valid XML Schema data type and .NET and other WS frameworks
  handle it. Also see
  http://www.w3.org/2001/XMLSchema.xsd.

  Revision  Changes    Path
  1.55      +1 -0      xml-axis/java/src/org/apache/axis/Constants.java

  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- Constants.java    28 Feb 2002 18:47:21 -0000    1.54
  +++ Constants.java    5 Mar 2002 14:19:57 -0000     1.55
  @@ -442,6 +442,7 @@
       public static final QName SOAP_VECTOR = new QName
       ("http://xml.apache.org/xml-soap", "Vector");

       public static       QName XSD_DATE = new
  QName(Constants.URI_CURRENT_SCHEMA_XSD, "dateTime");
  +    public static       QName XSD_DATE1 = new
  QName(Constants.URI_CURRENT_SCHEMA_XSD, "date");
       public static       QName XSD_DATE2= new
       QName(Constants.URI_1999_SCHEMA_XSD,    "timeInstant");
       public static       QName XSD_DATE3= new
       QName(Constants.URI_2000_SCHEMA_XSD,    "timeInstant");




  1.11      +7 -1
  xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java

  Index: DefaultTypeMappingImpl.java
  ===================================================================
  RCS file:
  /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v

  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- DefaultTypeMappingImpl.java   12 Feb 2002 16:50:20 -0000    1.10
  +++ DefaultTypeMappingImpl.java   5 Mar 2002 14:19:57 -0000     1.11
  @@ -264,7 +264,13 @@
                      new DateDeserializerFactory(java.util.Date.class,
                                                  Constants.XSD_DATE3),
                      true);
  -        myRegister(Constants.XSD_DATE,       java.util.Date.class,
  +        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,






Re: date vs dateTime (was: cvs commit: xml-axis/java/src/org/apache/axis/encoding DefaultTypeMappingImpl.java)

Posted by Davanum Srinivas <di...@yahoo.com>.
Russell,

How do i fix it? Any pointers? I ran "all-tests" before checking the code in.

Thanks,
dims

--- Russell Butek <bu...@us.ibm.com> wrote:
> WARNING!!  WARNING!!
> 
> You've just broken WSDL->Java->WSDL roundtripping!
> 
> WSDL date -> Java Date -> WSDL dateTime.
> 
> Last week at the interop meetings we've discovered that we really need
> WSDL->Java->WSDL roundtripping for the round III group D tests.  You've
> introduced a case where a group D scenario won't work.
> 
> I'm not saying we shouldn't support date (breaking round tripping isn't as
> bad as not working at all), but we MUST be VERY aware of the hole we're
> digging for ourselves.
> 
> Russell Butek
> butek@us.ibm.com
> ---------------------- Forwarded by Russell Butek/Austin/IBM on 03/05/2002
> 08:26 AM ---------------------------
> 
> 
> 
> 
> 
> dims@apache.org on 03/05/2002 08:19:57 AM
> 
> Please respond to axis-dev@xml.apache.org
> 
> To:    xml-axis-cvs@apache.org
> cc:
> 
> Subject:    cvs commit: xml-axis/java/src/org/apache/axis/encoding
>        DefaultTypeMappingImpl.java
> 
> 
> 
> 
> dims        02/03/05 06:19:57
> 
>   Modified:    java/src/org/apache/axis Constants.java
>                java/src/org/apache/axis/encoding
>                         DefaultTypeMappingImpl.java
>   Log:
>   adding support for "http://www.w3.org/2001/XMLSchema:date". "date" is a
>   perfectly valid XML Schema data type and .NET and other WS frameworks
>   handle it. Also see
>   http://www.w3.org/2001/XMLSchema.xsd.
> 
>   Revision  Changes    Path
>   1.55      +1 -0      xml-axis/java/src/org/apache/axis/Constants.java
> 
>   Index: Constants.java
>   ===================================================================
>   RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
>   retrieving revision 1.54
>   retrieving revision 1.55
>   diff -u -r1.54 -r1.55
>   --- Constants.java    28 Feb 2002 18:47:21 -0000    1.54
>   +++ Constants.java    5 Mar 2002 14:19:57 -0000     1.55
>   @@ -442,6 +442,7 @@
>        public static final QName SOAP_VECTOR = new QName
>        ("http://xml.apache.org/xml-soap", "Vector");
> 
>        public static       QName XSD_DATE = new
>   QName(Constants.URI_CURRENT_SCHEMA_XSD, "dateTime");
>   +    public static       QName XSD_DATE1 = new
>   QName(Constants.URI_CURRENT_SCHEMA_XSD, "date");
>        public static       QName XSD_DATE2= new
>        QName(Constants.URI_1999_SCHEMA_XSD,    "timeInstant");
>        public static       QName XSD_DATE3= new
>        QName(Constants.URI_2000_SCHEMA_XSD,    "timeInstant");
> 
> 
> 
> 
>   1.11      +7 -1
>   xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java
> 
>   Index: DefaultTypeMappingImpl.java
>   ===================================================================
>   RCS file:
>   /home/cvs/xml-axis/java/src/org/apache/axis/encoding/DefaultTypeMappingImpl.java,v
> 
>   retrieving revision 1.10
>   retrieving revision 1.11
>   diff -u -r1.10 -r1.11
>   --- DefaultTypeMappingImpl.java   12 Feb 2002 16:50:20 -0000    1.10
>   +++ DefaultTypeMappingImpl.java   5 Mar 2002 14:19:57 -0000     1.11
>   @@ -264,7 +264,13 @@
>                       new DateDeserializerFactory(java.util.Date.class,
>                                                   Constants.XSD_DATE3),
>                       true);
>   -        myRegister(Constants.XSD_DATE,       java.util.Date.class,
>   +        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,
> 
> 
> 
> 
> 


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/