Axis2 Maven plugin problem
I need to make pom.xml to generate Axis2 client based on WSDL file. Originally code was developed for client generated by Ant.
I used axistools-maven-plugin to do that. However Maven plugin generates different code.
I think the problem is plugin configuration. But i can't find enough documentation or examples to configure the plugin to generate in the same manner as Ant script.
Ant configuration:
<target name="generate.client">
<delete dir="${axis2.build}"/>
<mkdir dir="${client.target}"/>
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true" classpathref="axis2.classpath">
<arg line="-uri ${wsdl.uri}"/>
<arg line="-s"/>
<arg line="-l java"/>
<arg line="-ns2p ./src/main/wsdl/namespace2package.mapping"/>
<arg line="-p com.reuters.search2"/>
<arg line="-d xmlbeans"/>
<arg line="-o ${client.target}"/>
</java>
</target>
Maven plugin :
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<executions>
<execution>
<id>build_misc_wsdl</id>
<goals>
<goal>wsdl2java</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.build.sourceDirectory}/main/java</outputDirectory>
<debug>true</debug>
<testCases>false</testCases>
<verbose>true</verbose>
<allElements>true</allElements>
<wsdlFiles>
<wsdlFile>Search_2.wsdl</wsdlFile>
</wsdlFiles>
<serverSide>false</serverSide>
<useEmitter>true</useEmitter>
<fileNamespaceToPackage>namespace2package.mapping</fileNamespaceToPackage>
</configuration>
</execution>
</executions>
</plugin>