我有带有 wsimport 生成源的肥皂客户端。
我在 pom.xml 中使用以下设置
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
<configuration>
<wsdlFiles>
<wsdlFile>example.com_8080/services/test.wsdl</wsdlFile>
</wsdlFiles>
<wsdlLocation>http://example.com:8080/services/test?wsdl</wsdlLocation>
<staleFile>${project.build.directory}/jaxws/stale/test.stale</staleFile>
</configuration>
<id>wsimport-generate-test</id>
<phase>generate-sources</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
<xnocompile>true</xnocompile>
<verbose>true</verbose>
<extension>true</extension>
<catalog>${basedir}/src/jax-ws-catalog.xml</catalog>
</configuration>
</plugin>
而且我正在寻找如何不每次都从远程服务器( http://example.com:8080/services/test?wsdl )请求 wsdl/xsd 的最佳方法。所以,我想使用本地 wsdl/xsd 文件。有可能做到吗?