Hello,
I am currently in the process of replacing the IBM WebService framework with Axis2. When generating the code from the WSDL file, I use the Maven plugin WSDL2Code. However, the code created is always wrong. Or rather, the packagenames are always wrong, which in turn makes every method called uncallable (creating even more errors, up to 10.000+ errors in eclipse).
Here's an example of what is actually going on (this is just an example I made specifically to get advice):
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>Test</id>
<goals>
<goal>wsdl2code</goal>
</goals>
<configuration>
<packageName>test.testpackage</packageName>
<databindingName>xmlbeans</databindingName>
<wsdlFile>${basedir}/wsdl/service.wsdl</wsdlFile>
<outputDirectory>${basedir}/testdirectory</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
In theory, this should generate code with the package name "test.testpackage" in the directory testdirectory/test/testpackage. However, instead it creates the following package: Src.test.testpackage in the directory testdirectory.src.test.testpackage. It always adds a "src" to both package name and directory - if I change the package name to src.test.testpackage, it will generate the following package: src.src.test.testpackage.
This, of course, leads to a huge problem, because every generated file has the following error: "The declared package "src.test.testpackage" does not match the expected package "src.src.test.testpackage"
I'm at a complete loss here. I simply can't find any reason at all why it should add "src" everywhere. I've noticed an auto-generated build.xml file containing a value called sourcedirectory = x/src (or something similar), but there's nothing I can do to affect this value (trying to change it and then save the file makes no difference, obviously, since it's just generated again the next time I run maven).
Oh, and I generally use the command "mvn clean install" and version 1.4.1 of WSDL2Code, so it's not one of the old wsdl2code:wsdl2code bugs.
If anyone has any idea of what is actually wrong here, I'd greatly appreciate it.
Thanks in advance.