You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Simon Fell (JIRA)" <ax...@ws.apache.org> on 2005/02/02 19:41:17 UTC

[jira] Created: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
-------------------------------------------------------------

         Key: AXIS-1799
         URL: http://issues.apache.org/jira/browse/AXIS-1799
     Project: Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.2    
 Environment: XP / JDK 1.4.2_03
    Reporter: Simon Fell
    Priority: Critical
 Attachments: partner.wsdl

Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL

org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
Hint: you may have mapped two namespaces with elements of the same name to the same package name.
        at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
        at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
        at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
        at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
        at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
        at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
        at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
        at java.lang.Thread.run(Unknown Source)

when run with the -a option.

I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).

So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

Posted by "Simon Fell (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1799?page=history ]

Simon Fell updated AXIS-1799:
-----------------------------

    Attachment: partner.wsdl

> WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
> -------------------------------------------------------------
>
>          Key: AXIS-1799
>          URL: http://issues.apache.org/jira/browse/AXIS-1799
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>  Environment: XP / JDK 1.4.2_03
>     Reporter: Simon Fell
>     Priority: Critical
>  Attachments: partner.wsdl
>
> Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
> Hint: you may have mapped two namespaces with elements of the same name to the same package name.
>         at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
>         at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
>         at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
>         at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
>         at java.lang.Thread.run(Unknown Source)
> when run with the -a option.
> I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).
> So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1799?page=history ]

Davanum Srinivas reassigned AXIS-1799:
--------------------------------------

    Assign To: Venkat Reddy

Venkat,

Can u please research this issue? seems related to the prev problem that u fixed w.r.t name clashes.

thanks,
dims

> WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
> -------------------------------------------------------------
>
>          Key: AXIS-1799
>          URL: http://issues.apache.org/jira/browse/AXIS-1799
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>  Environment: XP / JDK 1.4.2_03
>     Reporter: Simon Fell
>     Assignee: Venkat Reddy
>     Priority: Critical
>  Attachments: partner.wsdl
>
> Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
> Hint: you may have mapped two namespaces with elements of the same name to the same package name.
>         at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
>         at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
>         at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
>         at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
>         at java.lang.Thread.run(Unknown Source)
> when run with the -a option.
> I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).
> So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1799?page=history ]
     
Tom Jordahl resolved AXIS-1799:
-------------------------------

     Resolution: Fixed
    Fix Version: 1.2

Added some code to correctly check for duplicate type names after we convert the name to a java name.  Added a test case.


> WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
> -------------------------------------------------------------
>
>          Key: AXIS-1799
>          URL: http://issues.apache.org/jira/browse/AXIS-1799
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>  Environment: XP / JDK 1.4.2_03
>     Reporter: Simon Fell
>     Assignee: Venkat Reddy
>     Priority: Critical
>      Fix For: 1.2
>  Attachments: partner.wsdl, sf.wsdl
>
> Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
> Hint: you may have mapped two namespaces with elements of the same name to the same package name.
>         at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
>         at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
>         at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
>         at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
>         at java.lang.Thread.run(Unknown Source)
> when run with the -a option.
> I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).
> So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

Posted by "Venkat Reddy (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1799?page=comments#action_58560 ]
     
Venkat Reddy commented on AXIS-1799:
------------------------------------

Tom,

I think that, the resolveNameClashes can't handle even non-types if their qnames differ only in case. For example, if we have two portType elements with same namespace but with local names differing only in case.

My understanding is - resolveNameClashes works if the resolution is needed between different kinds of elements, like between a service and a port type element, AND their qnames are identical.

The test case fails to satisfy both the conditions.

Venkat

> WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
> -------------------------------------------------------------
>
>          Key: AXIS-1799
>          URL: http://issues.apache.org/jira/browse/AXIS-1799
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>  Environment: XP / JDK 1.4.2_03
>     Reporter: Simon Fell
>     Assignee: Venkat Reddy
>     Priority: Critical
>  Attachments: partner.wsdl, sf.wsdl
>
> Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
> Hint: you may have mapped two namespaces with elements of the same name to the same package name.
>         at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
>         at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
>         at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
>         at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
>         at java.lang.Thread.run(Unknown Source)
> when run with the -a option.
> I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).
> So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1799?page=history ]

Tom Jordahl updated AXIS-1799:
------------------------------

    Attachment: sf.wsdl

Here is a stripped down test case, the problem is that "describeLayout" is defined along with "DescribeLayout" and we try to generate 2 classes with the same capitol "D".


> WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
> -------------------------------------------------------------
>
>          Key: AXIS-1799
>          URL: http://issues.apache.org/jira/browse/AXIS-1799
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>  Environment: XP / JDK 1.4.2_03
>     Reporter: Simon Fell
>     Assignee: Venkat Reddy
>     Priority: Critical
>  Attachments: partner.wsdl, sf.wsdl
>
> Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
> Hint: you may have mapped two namespaces with elements of the same name to the same package name.
>         at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
>         at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
>         at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
>         at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
>         at java.lang.Thread.run(Unknown Source)
> when run with the -a option.
> I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).
> So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1799) WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1799?page=comments#action_58538 ]
     
Tom Jordahl commented on AXIS-1799:
-----------------------------------

The fix for Axis-1598 caused this bug.

The original comment on thatbug said "If name collision occurs, it will be resolved in the resolveNameClashes() method of JavaGeneratorFactory." which is not true.  This resolve name clash routine doesn't do types, that should be handled in the javifyTypeEntryName() function in JavaGeneratorFactory.  It looks like the lookup in the SymbolTable was never checked, and it just worked in 1.1 mostly by accident.

Checking to see if activating this check will solve the problem.


> WSDL2Java generates name clashes now didn't in 1.1 or 1.2 RC1
> -------------------------------------------------------------
>
>          Key: AXIS-1799
>          URL: http://issues.apache.org/jira/browse/AXIS-1799
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>  Environment: XP / JDK 1.4.2_03
>     Reporter: Simon Fell
>     Assignee: Venkat Reddy
>     Priority: Critical
>  Attachments: partner.wsdl, sf.wsdl
>
> Somewhere between 1.2 RC1 and the 02/02/2005 CVS drop, I now get this error from the attached WSDL
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\sforce\soap\partner\DescribeLayout.java.
> Hint: you may have mapped two namespaces with elements of the same name to the same package name.
>         at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaTypeWriter.generate(JavaTypeWriter.java:113)
>         at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:423)
>         at org.apache.axis.wsdl.gen.Parser.generateTypes(Parser.java:540)
>         at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:427)
>         at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
>         at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:357)
>         at java.lang.Thread.run(Unknown Source)
> when run with the -a option.
> I noticed 2 things, in Axis 1.1 -a only generates additional classes for elements from the XSD schemas, and these would have a _XXXX class name. In Axis 1.2 -a also generates additional classes that represent each request opreation as well. And somewhere post RC1 the naming of the classes changed from _XXXX to XXXX, so now i get duplicates because there's an XSD type called DescribeLayout and there's an operation called describeLayout (also note that is seems to loose the fact that these are different by case).
> So the attached WSDL which is usable by Axis 1.1, early versions of Axis 1.2, is not usable by the latest CVS code. Either the genreation of classes for operations needs to be dropped, or the naming change needs to be reverted. (which would also make moving existing code from Axis 1.1 to use Axis 1.2 to be easier)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira