Ohh so it means for Axis2 I have to make object of ServiceClient like ServiceClient servi = new ServiceClient
Any changes in Call object? Regards ----- Original Message ---- From: Deepal jayasinghe <[EMAIL PROTECTED]> To: [email protected] Sent: Monday, September 17, 2007 11:50:59 AM Subject: Re: Calling Webservice by JSP > > > 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[] { }); > Seems like you are using Axis1 code , please try to use Axis2 ServiceClient. Thanks Deepal > > org.apache.a > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
