axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nasreen Laghari <lagharinasr...@hotmail.com>
Subject Calling Webservice by JSP
Date Sat, 15 Sep 2007 21:31:32 GMT


 
Hi,I'm using axis2 and windows vista. I'm trying to access webservice by jsp.I have pasted
Axis.jar and jaxrpc.jar to Tomcat 5.5\common\lib and also in java/jre/lib/ext.I'm having different
exception every time. Some time org.apache.axis.AxisClient can not be initialize, Some time
org/apache/commons/discovery/tools/DiscoverSingleton no class Def found error.I have a feeling
that may be axis.jar and jaxrpc.jar are conflicting as both have Service.class but i'm using
full path of Service Class So I dont know Why it is creating problem.Fowlling is the code
i'm using to create the JSP Client<%@ page import="org.apache.axis.client.Call,org.apache.axis.client.Service,org.apache.axis.encoding.XMLType,org.apache.axis.utils.Options,javax.xml.rpc.ParameterMode,java.net.URL"
%><%String endpointString = "http://localhost:8080/axis2/services/Random?wsdl"; Service
service1 = new Service();Call callOne = (Call)service1.createCall();Call callone = new Call();URL
endpoint = new URL(endpointString);callOne.setTargetEndpointAddress(endpoint);callOne.setOperationName("RandomNumber");String
ret = (String)callOne.invoke(new Object[] { });%><HTML><BODY><% out.println("Webservice
Outout:"+ret); %></BODY></HTML>And following is the detail copy of Error:org.apache.jasper.JasperException:
Could not initialize class org.apache.axis.client.AxisClientorg.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause javax.servlet.ServletException: Could not initialize class org.apache.axis.client.AxisClientorg.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)org.apache.jsp.abc_jsp._jspService(abc_jsp.java:63)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClientorg.apache.axis.client.Service.getAxisClient(Service.java:104)org.apache.axis.client.Service.<init>(Service.java:113)org.apache.jsp.abc_jsp._jspService(abc_jsp.java:49)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
And sometime I also get this:
exception org.apache.jasper.JasperException: org/apache/commons/discovery/tools/DiscoverSingleton
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause javax.servlet.ServletException: org/apache/commons/discovery/tools/DiscoverSingleton
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.abc_jsp._jspService(abc_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause java.lang.NoClassDefFoundError: org/apache/commons/discovery/tools/DiscoverSingleton
org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45) java.security.AccessController.doPrivileged(Native
Method) org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:41) org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:33)
org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:43) org.apache.axis.client.Service.getAxisClient(Service.java:104)
org.apache.axis.client.Service.<init>(Service.java:113) org.apache.jsp.abc_jsp._jspService(abc_jsp.java:49)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

_________________________________________________________________
Can you find the hidden words?  Take a break and play Seekadoo!
http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink
Mime
View raw message