I have a JAVA application deployed on Websphere. This application is looking for a local WSDL file to do a SOAP request. However whenever the Websphere reboots which is nightly scheduled, this below line throws a NullPointer as it couldn't find the path of the WSDL. When we cycle the JVM everything works fine until the next reboot.
Url baseUrl = MyJavaClass.class.getClassLoader().getResource("MyInterface.wsdl");
I will need this baseUrl later to continue with my SOAP request.
service = new ServiceInstance(baseUrl, new QName("http://myinterface.blah","ServiceInstance"));
Of course with the baseUrl
being Null this throws error. But once the JVM cycles everything works fine until it breaks again randomly. I have the WSDL inside my src/main/resources
folder which I set it as a Source folder.
Below is how my classLoading options are set in Websphere to make this work. I have tried every other possibility which fails.
Any ideas?