ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/wsdl/toJava JavaBeanHelperWriter.java
Date Sun, 20 Mar 2005 18:58:49 GMT
gdaniels    2005/03/20 10:58:49

  Modified:    java/src/org/apache/axis/wsdl/toJava
                        JavaBeanHelperWriter.java
  Log:
  Fix:
  
  http://issues.apache.org/jira/browse/AXIS-1869
  
  Don't walk the ref chain unless the TypeEntry is a CollectionTE - this should
  DTRT for true derived types.
  
  Revision  Changes    Path
  1.50      +6 -7      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java
  
  Index: JavaBeanHelperWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- JavaBeanHelperWriter.java	3 Mar 2005 18:28:35 -0000	1.49
  +++ JavaBeanHelperWriter.java	20 Mar 2005 18:58:49 -0000	1.50
  @@ -22,6 +22,7 @@
   import org.apache.axis.wsdl.symbolTable.ElementDecl;
   import org.apache.axis.wsdl.symbolTable.SchemaUtils;
   import org.apache.axis.wsdl.symbolTable.TypeEntry;
  +import org.apache.axis.wsdl.symbolTable.CollectionTE;
   
   import javax.xml.namespace.QName;
   import java.io.IOException;
  @@ -333,17 +334,15 @@
                           // If we have a DefinedType with dimensions, it must
                           // be a SOAP array derived type.  In this case, use
                           // the refType's QName for the metadata.
  -                        xmlType = elemType.getRefType().getQName();
  +                        elemType = elemType.getRefType();
                       } else {
  -
  -                        // Otherwise, use the type at the end of the ref
  -                        // chain.
  -                        while (elemType.getRefType() != null) {
  +                        // Otherwise, use the first non-Collection type we
  +                        // encounter up the ref chain.
  +                        while (elemType instanceof CollectionTE) {
                               elemType = elemType.getRefType();
                           }
  -
  -                        xmlType = elemType.getQName();
                       }
  +                    xmlType = elemType.getQName();
   
                       pw.print("        ");
   
  
  
  

Mime
View raw message