我通过以下方式设置了 jaxws-maven-plugin:
<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>
当我尝试运行时:
mvn jaxws:wsgen
我收到以下错误:
[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;
}
}
有谁知道我的设置有什么问题?
干杯。