axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser BeanDeserializer.java
Date Tue, 02 Apr 2002 14:22:11 GMT
scheu       02/04/02 06:22:11

  Modified:    java/src/org/apache/axis/encoding/ser BeanDeserializer.java
  Log:
  Fix to the bean serializer submitted by Ravi Kumar.  Thanks Ravi!
  The collectionIndex was not being reset properly.
  
  Revision  Changes    Path
  1.17      +10 -3     xml-axis/java/src/org/apache/axis/encoding/ser/BeanDeserializer.java
  
  Index: BeanDeserializer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanDeserializer.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- BeanDeserializer.java	28 Mar 2002 18:41:16 -0000	1.16
  +++ BeanDeserializer.java	2 Apr 2002 14:22:11 -0000	1.17
  @@ -102,6 +102,7 @@
       QName xmlType;
       Class javaType;
       protected HashMap propertyMap = new HashMap();
  +    protected QName prevQName;
       
       /** Type metadata about this class for XML deserialization */
       protected TypeDesc typeDesc = null;
  @@ -157,9 +158,15 @@
       {
           BeanPropertyDescriptor propDesc = null;
           
  -        if (typeDesc != null) {
  -            QName elemQName = new QName(namespace, localName);
  -            
  +        QName elemQName = new QName(namespace, localName);
  +        // The collectionIndex needs to be reset for Beans with multiple arrays
  +        if ((prevQName == null) || (!prevQName.equals(elemQName))) {
  +            prevQName = elemQName;
  +            collectionIndex = -1;
  +        }  
  +        prevQName = elemQName;
  +
  +        if (typeDesc != null) {       
               // IF we're SOAP-encoded AND this is an unprefixed element,
               // ignore the actual namespace context for the element, and
               // just compare local names.
  
  
  

Mime
View raw message