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 ax...@ws.apache.org on 2004/10/13 05:23:55 UTC

[jira] Closed: (AXIS-1583) BeanDeserializerFactory incorrectly handles "JAX-RPC Enum" classes

Message:

   The following issue has been closed.

   Resolver: Davanum Srinivas
       Date: Tue, 12 Oct 2004 8:23 PM

Applied fix.

thanks,
dims
---------------------------------------------------------------------
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: Closed
   Priority: Critical
 Resolution: FIXED

    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 8:23 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


Re: [jira] Closed: (AXIS-1583) BeanDeserializerFactory incorrectly handles "JAX-RPC Enum" classes

Posted by John Major <jm...@realmsys.com>.
axis-dev@ws.apache.org wrote:
> Message:
> 
>    The following issue has been closed.
> 
>    Resolver: Davanum Srinivas
>        Date: Tue, 12 Oct 2004 8:23 PM
> 
> Applied fix.
> 
> thanks,
> dims

Thanks very much, Oh Committers, for your prompt response - very
helpful, and good luck with the next release - keep 'em coming!

-- 
John Major
Senior Software Developer
Realm Systems, Inc.
9350 S. 150 East, Suite 950
Sandy, UT 84070
Voice: 208-8100
FAX: 208-8101