You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by to...@apache.org on 2005/02/03 18:33:05 UTC

cvs commit: ws-axis/java/src/org/apache/axis/wsdl/toJava JavaGeneratorFactory.java

tomj        2005/02/03 09:33:05

  Modified:    java/test/wsdl/clash build.xml VerifyFilesTestCase.java
               java/src/org/apache/axis/wsdl/toJava
                        JavaGeneratorFactory.java
  Log:
  Fix for AXIS-1799 - Duplicate file exception throw when 2 elements have the
  same name and differ only in the capitolization of the first letter.
  
  Fix JavaGeneratorFactory to notice duplicate type entries from the symbol table
  in addition to the anonymous types list.
  
  Add a test case to wsdl/clash.
  
  Revision  Changes    Path
  1.13      +4 -0      ws-axis/java/test/wsdl/clash/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/clash/build.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- build.xml	2 Jun 2004 17:05:17 -0000	1.12
  +++ build.xml	3 Feb 2005 17:33:04 -0000	1.13
  @@ -61,6 +61,10 @@
                  serverSide="yes">
       </wsdl2java>
   
  +    <wsdl2java url="${axis.home}/test/wsdl/clash/duplicate-element.wsdl"
  +               output="${axis.home}/build/work">
  +    </wsdl2java>
  +
       <copy todir="${build.dir}/work/test/wsdl/clash" overwrite="yes">
         <fileset dir="${axis.home}/test/wsdl/clash">
           <include name="*TestCase.java"/>
  
  
  
  1.11      +2 -0      ws-axis/java/test/wsdl/clash/VerifyFilesTestCase.java
  
  Index: VerifyFilesTestCase.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/clash/VerifyFilesTestCase.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- VerifyFilesTestCase.java	20 Oct 2004 13:49:35 -0000	1.10
  +++ VerifyFilesTestCase.java	3 Feb 2005 17:33:04 -0000	1.11
  @@ -38,6 +38,8 @@
           HashSet set = new HashSet();
           set.add("AnotherNonSharedNameImpl.java");
           set.add("AnotherNonSharedNameStub.java");
  +        set.add("DescribeLayoutType0.java");
  +        set.add("DescribeLayout.java");
           set.add("NonSharedNameImpl.java");
           set.add("NonSharedNameStub.java");
           set.add("SayHello.java");
  
  
  
  1.64      +3 -4      ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java
  
  Index: JavaGeneratorFactory.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/toJava/JavaGeneratorFactory.java,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- JavaGeneratorFactory.java	19 Jan 2005 21:04:22 -0000	1.63
  +++ JavaGeneratorFactory.java	3 Feb 2005 17:33:04 -0000	1.64
  @@ -640,10 +640,9 @@
                       // If there is an existing anon type,
                       // there will be a  collision.
                       // In both cases, mangle the name.
  -                    symbolTable.getType(typeQName);
  -                    
  -                    if (anonQNames.get(typeQName) != null) {
  -                        localName += "Type" + uniqueNum++;
  +                    if (symbolTable.getType(typeQName) != null ||
  +                            anonQNames.get(typeQName) != null) {
  +                        localName += "Type" + unique+;
                           typeQName =
                               new QName(typeQName.getNamespaceURI(),
                                         localName);