axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal jayasinghe <deep...@gmail.com>
Subject Re: Calling Webservice by JSP
Date Mon, 17 Sep 2007 10:50:59 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[] { });
>
Seems like you are using Axis1 code , please try to use Axis2 ServiceClient.

Thanks
Deepal
>
>     org.apache.a
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message