axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1583) BeanDeserializerFactory incorrectly handles "JAX-RPC Enum" classes
Date Tue, 12 Oct 2004 19:16:52 GMT
The following comment has been added to this issue:

     Author: John Major
    Created: Tue, 12 Oct 2004 12:14 PM
       Body:
Will a committer please review this issue and get the fix into the source base? It seems like
a obvious mistake, but I could be missing something... Thanks.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1583?page=comments#action_53950

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1583

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1583
    Summary: BeanDeserializerFactory incorrectly handles "JAX-RPC Enum" classes
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.1

   Assignee: 
   Reporter: John Major

    Created: Mon, 4 Oct 2004 8:05 AM
    Updated: Tue, 12 Oct 2004 12:14 PM
Environment: Mandrake Linux 10.1 - JDK 1.4.2_04

Description:
BeanDeserializerFactory is supposed to handle "JAX-RPC Enum" classes, according to this method
that it uses in org.apache.axis.utils.JavaUtils:

   /**
    * Determine if the class is a JAX-RPC enum class.
    * An enumeration class is recognized by
    * a getValue() method, a toString() method, 
    * a fromString(String) method
    * a fromValue(type) method and the lack
    * of a setValue(type) method
    */
   public static boolean isEnumClass(Class cls) {

(It would be helpful, BTW, if the javadoc included the necessary "static" specifiers in the
method descriptions above.) It is recognizing my class correctly, and is apparently prepared
to deserialize it after init'ing. BUT - this code in BeanDeserializerFactory:

       if (deserClass == EnumSerializer.class) {
          return super.getGeneralPurpose(mechanismType);
       }

       return new BeanDeserializer(javaType, xmlType, typeDesc, 
          propertyMap);


fails to treat my class as an enum class every time, because "deserClass" is actually EnumDeserializer.
If I change it to:
                             ^^

      if (deserClass == EnumDeserializer.class) {

the deserialization of the class works fine.
I've pulled out the latest Axis CVS source, and the bug appears to still be there. So:

- Is my diagnosis and fix correct?

- If so, what's the best way to get it into the current release quickly? I'm a newbie to the
Apache open source community.

- And if I'm correct, how did it ever work? My theory is that since most Axis users appear
to use java2wsdl (we are not), serialization of enums was taken care of by a generated getDeserializer()
function - but that's a shot in the dark - did I hit anything?   ;-)



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message