axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/utils FieldPropertyDescriptor.java
Date Mon, 12 Apr 2004 03:30:59 GMT
dims        2004/04/11 20:30:59

  Modified:    java/src/org/apache/axis/encoding/ser BeanSerializer.java
               java/src/org/apache/axis/utils FieldPropertyDescriptor.java
  Log:
  Fix for AXIS-844 - Java2WSDL Does Not Handle byte[] Mapping Properly
  
  Revision  Changes    Path
  1.75      +24 -7     ws-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java
  
  Index: BeanSerializer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v
  retrieving revision 1.74
  retrieving revision 1.75
  diff -u -r1.74 -r1.75
  --- BeanSerializer.java	25 Mar 2004 13:39:58 -0000	1.74
  +++ BeanSerializer.java	12 Apr 2004 03:30:59 -0000	1.75
  @@ -27,6 +27,7 @@
   import org.apache.axis.utils.BeanPropertyDescriptor;
   import org.apache.axis.utils.BeanUtils;
   import org.apache.axis.utils.Messages;
  +import org.apache.axis.utils.FieldPropertyDescriptor;
   import org.apache.axis.wsdl.fromJava.Types;
   import org.apache.axis.wsdl.symbolTable.SchemaUtils;
   import org.apache.commons.logging.Log;
  @@ -316,14 +317,13 @@
                   continue;
               }
   
  -            Class fieldType = propertyDescriptor[i].getType();
  -
               // If we have type metadata, check to see what we're doing
               // with this field.  If it's an attribute, skip it.  If it's
               // an element, use whatever qname is in there.  If we can't
               // find any of this info, use the default.
   
               if (typeDesc != null) {
  +                Class fieldType = propertyDescriptor[i].getType();
                   FieldDesc field = typeDesc.getFieldByName(propName);
   
                   if (field != null) {
  @@ -363,11 +363,28 @@
                                  propertyDescriptor[i].isIndexed(), false, all, false);
                   }
               } else {
  -                writeField(types,
  -                           propName,
  -                           null,
  -                           fieldType,
  -                           propertyDescriptor[i].isIndexed(), false, all, false);
  +                boolean done = false;
  +                if(propertyDescriptor[i] instanceof FieldPropertyDescriptor){
  +                    FieldPropertyDescriptor fpd = (FieldPropertyDescriptor) propertyDescriptor[i];
  +                    Class clazz = fpd.getField().getType();
  +                    if(types.getTypeQName(clazz)!=null) {
  +                        writeField(types,
  +                                   propName,
  +                                   null,
  +                                   clazz,
  +                                   false, false, all, false);
  +                   
  +                        done = true;
  +                    }
  +                }
  +                if(!done) {
  +                    writeField(types,
  +                               propName,
  +                               null,
  +                               propertyDescriptor[i].getType(),
  +                               propertyDescriptor[i].isIndexed(), false, all, false);
  +                }                    
  +                
               }
           }
   
  
  
  
  1.8       +4 -0      ws-axis/java/src/org/apache/axis/utils/FieldPropertyDescriptor.java
  
  Index: FieldPropertyDescriptor.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/utils/FieldPropertyDescriptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FieldPropertyDescriptor.java	25 Feb 2004 14:02:48 -0000	1.7
  +++ FieldPropertyDescriptor.java	12 Apr 2004 03:30:59 -0000	1.8
  @@ -142,4 +142,8 @@
               return field.getType();
           }
       }
  +
  +    public Field getField() {
  +        return field;
  +    }
   }
  
  
  

Mime
View raw message