Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jax-ws maven plugin sets wsdlLocation to absolute path

I generate web service client using

<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>

my EndpointService.wsdl is in src/main/wsdl. Plugin generates EndointServiceService.java with annotation

@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")

so if wsdl

D:/Source/java/branches/9.3.0/camel-smev/wscapi/src/wsdl/EndpointService.wsdl 

not exist(on another machine), it throw exception in runtime. if i copy wsdl to this dir it runs successfully. How can i include wsdl into my target jar and make client use it? Or how to exclude wsdl dependency at runtime at all? Maybe try older version or another plugin?

like image 709
cynepnaxa Avatar asked Sep 28 '22 11:09

cynepnaxa


1 Answers

add the < wsdllocation > tag in the plugin configuration to a relative path for your wsdl. you can find an example here

like image 197
subir Avatar answered Oct 18 '22 11:10

subir