I am using wsimport in a web service client project to generate artifact classes based on wsdl files. I am trying to reference locally the wsdl files, by using wsdlLocation attribute. The generated services will try to create an URL based on the path to the package where the service class resides and the value of the wsdlLocation attribute.
The problem is that the generated service class is using class.getResource(".")
in order to get the path to the current directory (the package/directory where the service class is). If the application is packaged in a jar (as in my case) this code returns null. I have noticed that class.getResource("") would in fact return the correct path, but changing the generated code seems like an ugly solution. I was wondering if there is some way to set the classpath, so that the previous code would return the path to the package/directory where the generated service class resides (as intended)?
Thank you