axistools-maven-plugin
Posted by Bruce Tsai
透過 maven 的 axis plugin 自動產生 web service 的 client code。配置設定檔如下,設定值參考[參數說明]。
maven 配置
- pom.xml
<dependencies>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>axistools-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<wsdlFiles>
<wsdlFiles>HelloCXFService.wsdl</wsdlFiles>
<wsdlFiles>HelloWorldService.wsdl</wsdlFiles>
<wsdlFiles>IHelloCXFService.wsdl</wsdlFiles>
</wsdlFiles>
<sourceDirectory>${basedir}/src/main/resources/</sourceDirectory>
<allElements>true</allElements>
<!-- Where you want the generated files: -->
<outputDirectory>${basedir}/src/main/java</outputDirectory>
<subPackageByFileName>true</subPackageByFileName>
<useEmitter>false</useEmitter>
<verbose>true</verbose>
</configuration>
<dependencies>
<!-- Required for attachment support; you can remove these dependencies
if attachment support is not needed. Note that if you do want it, you have
to specify the dependencies both here in the plugin and also in the POM dependencies. -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>