I am trying to generate java classes with a service provider WSDL, using Axis 1.4, JDK 1.5 (the package parameter is com.amanda.ws). I ended up with following exception. Not able to figure out why this is happening. Can anybody help please?
Thanks in advance:
org.apache.axis.wsdl.toJava.DuplicateFileException: Duplicate file name: src\com\amanda\ws\PaymentFrequencyType.java.
Hint: you may have mapped two namespaces with elements of the same name to the same package name.
Hi Rex. Just wanted to mention a couple of things.
1. There's a newer version of Axis out.
2. I'm not sure how you are invoking the wsdl2java but you need to set the flag to overwrite the existing files.
The option I had in mind was "-or" for Override Existing Code.
Generally speaking when I run Wsdl2java myself I usually do it from a command line. If you don't want to keep typing the command line parameters over and over you can simply create a batch file and invoke it.
Another suggestion I would make is to invoke the wsdl2java with the -h parameter only, or no parameter should work as well, so that you can see which parameters your version of wsdl2java accepts. That way you can check if that "src" parameter is correct.
Lastly, I wanted to mention that I now use Eclipse to generate the client code and no longer run wsdl2java manually.