axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <>
Subject [jira] Commented: (AXIS-1775) WSDL2Java won't resolve name clashes when -p is specified
Date Sun, 23 Jan 2005 15:17:17 GMT
     [ ]
Davanum Srinivas commented on AXIS-1775:

please go ahead and commit :)

-- dims

> WSDL2Java won't resolve name clashes when -p is specified
> ---------------------------------------------------------
>          Key: AXIS-1775
>          URL:
>      Project: Axis
>         Type: Bug
>  Environment: Axis 1.2 RC2
>     Reporter: Venkat Reddy
>  Attachments: diff.txt
> If the WSDL has same value for name attribute for both <service> and <portType>,
WSDL2Java with -p option results in DuplicateFileException.
> C:\web_services>java org.apache.axis.wsdl.WSDL2Java -p com.test GlobalWeather.wsdl
> org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: com\test\
> Hint: you may have mapped two namespaces with elements of the same name to the same package
> Cause: Namespaces.getCreate() simply returns default doesn't populate pkg2NamespacesMap
resulting in empty collisionCanidates in JavaGeneratorFactory.resolveNameClashes(), and the
java class names wont get resolved, like when the -p option is not used.
> Fix: add a call to put(key, defaultPackage) inside Namespaces.getCreate() method to populate
pkg2NamespacesMap even when the default package is used.
> Result: WSDL2Java will use file names like
instead of, thus resolving name conflicts when the -p is used. If -p is
not used, it will work as usual.
> Please let me know if this fix can potentially break something else.
> Venkat

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message