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?
add the < wsdllocation > tag in the plugin configuration to a relative path for your wsdl. you can find an example here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With