我正在使用Eclipse&Maven。我可以使用pom.xml中的以下插件,通过给.wsdl url来生成客户端代码
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>${plugin.maven.jaxws.version}</version>
<executions>
<execution>
<id>wsdl-calculator </id>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlDirectory>${basedir}/src/main/resources/wsdl</wsdlDirectory>
<packageName>first.try.WS</packageName>`
</configuration>
</execution>
</executions>
</plugin>
我能够清理和构建项目。但是当我运行该项目时,它无法创建Web服务: 它显示以下错误:
avax.xml.ws.WebServiceException:
org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.