Imagine this scenario.
I have a wsdl file with namespace a/b/c and it imports another wsdl whose namespace is m/n/o. Unfortunately, both of them have same ComplexTypes X
If you want to generate package depending on the namespace here is the solution:
org.apache.cxf
cxf-codegen-plugin
2.6.0
generate-sources
generate-sources
${basedir}/target/generated/src/main/java
yourWsdl.wsld
-client
-verbose
-p
http://your.namespace/services/=your.package
-p
http://your.namespace2/services2/=your.package2
wsdl2java
This
will map your namespace with the package you want.