I need to get URL to a resource within a jar file. I use this URL as an argument to my service call. My below code fails with "No such File or Directory" error.
File file = new File(classLoader.getResource("AXLAPI.wsdl").getFile());
final URL wsdlURL = new URL(this.getClass().getResource(this.getClass().getSimpleName() +".class"),file.toString());
String endpoint = "https://<machine>:8443/axl/";
AXLAPIService ss = new AXLAPIService( wsdlURL );
Below is the error am seeing on executing this -
Failed to access the WSDL at: file:/blah/blah/blah.jar!/AXLAPI.wsdl. It failed with:
/blah/blah/blah.jar!/AXLAPI.wsdl (No such file or directory).
I would really appreciate any suggestions to handle this !