I have dozens and dozens .xsd files that I want to auto-generate code for. A couple of the files have duplicate names that clash when I try to generate all of t
We had a similar problem: we had one wsdl file and two xsd files in the same directory. The wsdl file imports the two xsd files. The problem was that JAXB was taking all three files into consideration and throwing '... is already defined' error. It was basically complaining that it saw the same element in both wsdl and xsd file.
We could fix this issue in the maven plugin configuration (in pom.xml) by adding an exclude tag as in the following example:
org.jvnet.jaxb2.maven2
maven-jaxb2-plugin
0.12.3
generate
WSDL
mywsdl.wsdl
-XautoNameResolution
*.xsd