maven2项目
针对maven2项目
把该内容直接拷贝到pom.xml里面,然后运行项目Run As ——>maven package
pom.xml
<properties>
<cxf.version>2.4.2</cxf.version>
</properties>
<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>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependencies>
<!-- 自动生成xsd 和 wsdl 文件 -->
<build>
<plugins>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-java2ws-plugin</artifactId>
<version>${cxf.version}</version>
<executions>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<configuration>
<!-- 换成自己的实际类全名 -->
<className>cn.hnrepair.webserver.ws.ISCSyncServiceImplPortImpl</className>
<genWsdl>true</genWsdl>
<verbose>true</verbose>
<argline>-createxsdimports</argline>
</configuration>
<goals>
<goal>java2ws</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>