5

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?

cynepnaxa
  • 1,024
  • 1
  • 14
  • 30

1 Answers1

4

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

Community
  • 1
  • 1
subir
  • 310
  • 4
  • 13