【发布时间】:2015-03-24 03:15:36
【问题描述】:
我使用生成 Web 服务客户端
<plugin>
<groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<target>2.1</target>
<xnocompile>false</xnocompile>
</configuration>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
</plugin>
我的 EndpointService.wsdl 位于 src/main/wsdl。插件生成带注解的 EndpointServiceService.java
@WebServiceClient(name = "EndpointServiceService", targetNamespace = "http://soap.endpoint.fsg.ftc/", wsdlLocation = "file:/D:/Source/java/branches/9.3.0/camel-smev/wscapi/src/wsdl/EndpointService.wsdl")
所以如果 wsdl
D:/Source/java/branches/9.3.0/camel-smev/wscapi/src/wsdl/EndpointService.wsdl
不存在(在另一台机器上),它在运行时抛出异常。 如果我将 wsdl 复制到此目录,它将成功运行。如何将 wsdl 包含到我的目标 jar 中并让客户使用它?或者如何在运行时完全排除 wsdl 依赖?也许尝试旧版本或其他插件?
【问题讨论】:
标签: web-services maven wsdl jax-ws jaxws-maven-plugin