CXF自动生成wsdl与xsd文件
针对maven2项目
//把该内容直接拷贝到pom.xml里面,然后运行项目Run As ——>maven package
<!--导入cxf版本定义 -->
<properties>
<cxf.version>2.4.2</cxf.version>
</properties>
<build设置>
<build>
<outputDirectory>webapp/WEB-INF/classes</outputDirectory> //输出目录
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-java2ws-plugin</artifactId>
<version>${cxf.version}</version>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-simple</artifactId>
<version>${cxf.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<configuration>
<className>
com.incesoft.commbank.smsservice.SmsSendServiceImpl //要生成的接口(接口与实现类都一样)的全类名
</className>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
<argline>-createxsdimports</argline>
</configuration>
<goals>
<goal>java2ws</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>