I have created a simple website that invokes a javaservlet to validate some form info such as email and phone. In the servlet I am calling several java classes that generated from WSDL url using the WSDL2Java tool that come with Axis (Am using Axis_1.4 and Tomcat 7.0.2 server).
My problem is that am getting a CLASS not found exception: javax.xml.rpc.Service when I submit the form from the website. I've tried testing the webservice on commandline (not from the website) and the web service works fine. The problem seem to be that the servlet when called externally (on form submit), doesn't have a way of finding the jaxrpc.jar file in the lib directory of axis.
Any suggestions on how I can get this working?
Seems to me a usual problem. Clearly, you have jax-rpc.jar missing in your server/web application classpath. Add this jar into WEB-INF/lib directory. But, this doesn't work always if there are conflicts between server classes and application classes. For Axis1.4 you need to add following jars unless already existing in your server classpath or conflicting with other versions.
axis2.jar, jaxrpc.jar, wsdl4j-1.5.1.jar, saaj.jar and commons-discovery-0.2.jar
(OCEEJBD6, SCWCD5, SCDJWS, SCJP1.4 and Oracle SQL 1Z0-051)
posted 9 years ago
Thanks a lot Nareen.
I was missing the *.jar files in the WEB-INF/class dir of mywebapp dir. I had the *.jar files under TOMCAT_HOME/webapps/axis/WEB-INF/lib. I copied them to TOMCAT_HOME/webapps/myapp/WEB-INF/lib dir, and it now works!!
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad: