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/utils axisNLS.properties
Date Fri, 21 Jun 2002 21:40:04 GMT
scheu       2002/06/21 14:40:04

  Modified:    java/src/org/apache/axis/encoding/ser BeanSerializer.java
               java/src/org/apache/axis/utils axisNLS.properties
  Log:
  Fix for Bugzilla defect http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9875
  
  When writing schema for a class, ignore the properties of the super class.
  Failure to do this causes elements to be repeated in the base and derived
  complexTypes in the wsdl.
  
  Also made some minor translation edits to the message file.
  
  Revision  Changes    Path
  1.37      +23 -1     xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java
  
  Index: BeanSerializer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/BeanSerializer.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- BeanSerializer.java	20 Jun 2002 20:35:46 -0000	1.36
  +++ BeanSerializer.java	21 Jun 2002 21:40:03 -0000	1.37
  @@ -252,6 +252,7 @@
           // See if there is a super class, stop if we hit a stop class
           Element e = null;
           Class superClass = javaType.getSuperclass();
  +        BeanPropertyDescriptor[] superPd = null;
           List stopClasses = types.getStopClasses();
           if (superClass != null &&
                   superClass != java.lang.Object.class &&
  @@ -267,6 +268,10 @@
               complexContent.appendChild(extension);
               extension.setAttribute("base", base);
               e = extension;
  +            // Get the property descriptors for the super class
  +            superPd =
  +                BeanUtils.getPd(superClass,
  +                                TypeDesc.getTypeDescForClass(superClass));
           } else {
               e = complexType;
           }
  @@ -287,8 +292,25 @@
           // Serialize each property
           for (int i=0; i<propertyDescriptor.length; i++) {
               String propName = propertyDescriptor[i].getName();
  -            if (propName.equals("class"))
  +
  +            // Don't serializer properties named class
  +            boolean writeProperty = true;
  +            if (propName.equals("class")) {
  +                writeProperty = false;
  +            }
  +
  +            // Don't serialize the property if it is present
  +            // in the super class property list
  +            if (superPd != null && writeProperty) {
  +                for (int j=0; j<superPd.length && writeProperty; j++) {
  +                    if (propName.equals(superPd[j].getName())) {
  +                        writeProperty = false;
  +                    }
  +                }
  +            }            
  +            if (!writeProperty) {
                   continue;
  +            }                
   
               // 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
  
  
  
  1.12      +5 -0      xml-axis/java/src/org/apache/axis/utils/axisNLS.properties
  
  Index: axisNLS.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/axisNLS.properties,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- axisNLS.properties	20 Jun 2002 21:17:38 -0000	1.11
  +++ axisNLS.properties	21 Jun 2002 21:40:03 -0000	1.12
  @@ -504,6 +504,8 @@
   popHandler00=Popping handler {0}
   process00=Processing ''{0}''
   processFile00=Processing file {0}
  +
  +# NOTE:  in pushHandler00, we are pushing a handler onto a stack
   pushHandler00=Pushing handler {0}
   quit00={0} quitting.
   quitRequest00=Administration service requested to quit, quitting.
  @@ -788,7 +790,10 @@
   length=Length:  {0}
   writeBeyond=Write beyond buffer
   reading=reading {0} bytes from disk
  +
  +# NOTE: do not translate openBread
   openBread=open bread = {0}
  +
   flushing=flushing
   read=read {0} bytes
   readError=Error reading data stream:  {0}
  
  
  

Mime
View raw message