I'm trying to find the best way access a local wsdl, instead of going over http to a remote WSDL when creating a client-side service.
I want to package the WSDL in the same jar as my classes i've compiled as a resource but I haven't quite figured out how to create a java.net.URL to point at that WSDL.
I have been sucessful putting the wsdl in a known location and creating a URL with a file protocol and pointing to the absolute path on the server, but thats not as flexible as I want it to be, i was hoping to deploy it in a JAR
Has anyone else been sucessful with this?
Have you tried something like this:
URL x = Thread.currentThread().getContextClassLoader().findResource(WSDL_NAME);
where WSDL_NAME is the relative path to the file within the JAR.