5

を使用して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 にあります。プラグインは、アノテーション付きの EndointServiceService.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 依存関係をまったく除外する方法は? 古いバージョンや別のプラグインを試してみませんか?

4

1 に答える 1