cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emulator <>
Subject Behavior of wsdl2java between 3.0.1, 3.0.9 and 3.1.6
Date Thu, 14 Apr 2016 03:14:21 GMT
Hi guys,
    I had a little experience on 3.0.1 and built a program by using
wsdl2java to generate java class. And I back again, use CXF on another
project, wish to keep them updated to 3.1.6.
    I use 3.1.6 to generate java class as following:
    ~/bin/apache-cxf-3.1.6/bin/wsdl2java -p -client -impl -d
output.3.1.6 AGivenDef.wsdl
    but failed as "A class/interface with the same name
"com.aitc.test.DataSimple" is already in use. Use a class customization or
the -autoNameResolution option to resolve this conflict."
    I tried to use:
    ~/bin/apache-cxf-3.1.6/bin/wsdl2java  -autoNameResolution -p
-client -impl -d output.3.1.6 AGivenDef.wsdl    
    but "Two declarations cause a collision in the ObjectFactory class."
error still happened.

    After some testing, I dropped the package parameter, it works:
    ~/bin/apache-cxf-3.1.6/bin/wsdl2java  -client -impl -d output.3.1.6
    Generate codes just without package name.

    Then I tried to use 3.0.9, get exactly the same result as 3.1.6.

    I go back to use 3.0.1, use the first line:
    ~/bin/apache-cxf-3.0.1/bin/wsdl2java -p -client -impl -d
output.3.0.1 AGivenDef.wsdl
    It successfully generated codes with package

    I google some about "Two declarations cause a collision in the
ObjectFactory class." but they are not related to package parameter.

    I want know the reason, or how to adjust my parameter in 3.0.9/3.1.6. Or
Can I use the code generated by 3.0.1 in later version?


View this message in context:
Sent from the cxf-user mailing list archive at

View raw message