Maven jaxws:wsgen找不到Web服务
我通过以下方式设置了jaxws maven插件:Maven jaxws:wsgen找不到Web服务,maven,jax-ws,Maven,Jax Ws,我通过以下方式设置了jaxws maven插件: <plugin> <groupId>org.jvnet.jax-ws-commons</groupId> <artifactId>jaxws-maven-plugin</artifactId> <version>2.2</version> <exe
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>generate-wsdl-for-random-num-generator</id>
<goals>
<goal>wsgen</goal>
</goals>
<configuration>
<sei>mydomain.sib.RandomNumberGeneratorEndpoint</sei>
<destDir>${basedir}\wsdls\</destDir>
</configuration>
</execution>
</executions>
</plugin>
我得到以下错误:
[ERROR] Failed to execute goal org.jvnet.jax-ws-commons:jaxws-maven-plugin:2.2:w
sgen (default-cli) on project soap-ws: No @javax.jws.WebService found. -> [Help
1]
mydomain.sib.RandomNumberGeneratorEndpoint确实具有@javax.jws.WebService注释:
@WebService(endpointInterface = "mydomain.RandomNumberGenerator")
public class RandomNumberGeneratorEndpoint implements RandomNumberGenerator {
public double getRandomNumber(long limit) {
return Math.random() * limit;
}
}
有人知道我的设置有什么问题吗
干杯。事实证明,问题相当简单:我错过了插件设置中的genWsdl标记 安装程序现在看起来像:
<configuration>
<sei>mydomain.sib.RandomNumberGeneratorEndpoint</sei>
<genWsdl>true</genWsdl>
<resourceDestDir>${basedir}\wsdls\randomNumberGenerator</resourceDestDir>
</configuration>
mydomain.sib.RandomNumberGeneratorEndpoint
真的
${basedir}\wsdls\randomNumberGenerator
我在阅读文档时确实看到了这个标签-但我没有意识到这是问题所在。。。我把球掉了
无论如何,谢谢你,希望这个答案有一天对别人有用
<configuration>
<sei>mydomain.sib.RandomNumberGeneratorEndpoint</sei>
<genWsdl>true</genWsdl>
<resourceDestDir>${basedir}\wsdls\randomNumberGenerator</resourceDestDir>
</configuration>