I'm generating java classes from multiple wsdl files. Works. However, I want to provide the appropriate wsdl file in the @WebServiceClient annotation. In the attribute wsdlLocation I expect the directory path concatenated with the distinct file name. E.g. /myDir/myWsdl-1.wsdl for the first webservice. However, the wsdlLocation is populated with "/myDir" only - without the service name. How do I supply that name for each wsdl?
@WebServiceClient(name = "myService", targetNamespace = "http://mycompany.com/services/", wsdlLocation = "/myDir")
Below is my instruction:
<wsdlLocation>/myDir</wsdlLocation>
<wsdlDirectory>src/main/resources/myDir</wsdlDirectory>
<wsdlFiles>
<wsdlFile>myWsdl-1.wsdl</wsdlFile>
<wsdlFile>myWsdl-2.wsdl</wsdlFile>
<wsdlFile>myWsdl-3.wsdl</wsdlFile>
<wsdlFile>myWsdl-4.wsdl</wsdlFile>
</wsdlFiles>
What slips my attention?
Thanks for any hints. Feder.
Ok. One may use the path followed by a slash and an asterisk in order to generate classes for mutlitple WSDL files. E.g.
<wsdlLocation>/myDir/*</wsdlLocation>
However, in this case, you cannot apply a binding.
<bindingDirectory>src/main/binding</bindingDirectory>
If you need to apply a binding for each of the WSDLs, then you must repeat the execution block of the plugin or apply a wsdl-inline-binding. See this discussion for inline-binding.
Hope this helps others, too.
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