You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by silver17 <si...@hotmail.com> on 2008/10/15 18:45:19 UTC
Error on auto-generated wsdl using JAXWSDeployer...
Hi guys,
I've been looking at a standard way to develop web services that could
potentially be slightly more portable across multiple servers, and the best
way I've seen so far is to use JAX-WS annotations.
I created a simple java program in eclipse. After that I export the project
as a jar file and deploy that jar to Axis2 1.4. First I create the
servicejars folder in Axis2. When I run Axis2 as a standalone server
(AXIS2_HOME/bin/Axis2Server.bat) it deploys and runs fine.
http://localhost:8080/axis2/services/CalculatorService.CalculatorPort?wsdl
However when I create the war file off the binary distribution, deploy that
to Tomcat 5.5 and export Calculator.jar to the servicejars folder i get an
error. However if I issue the command:
http://localhost:8080/axis2/services/CalculatorService.CalculatorPort?wsdl2
It works fine on both the standalone axis2-1.4 as well as the deployed
webapp to tomcat 5.5.
Here's the Code:
package ca.math.calculator;
import javax.jws.WebMethod;
import javax.jws.WebService;
/**
* Calculator service class.
*
*/
@WebService(
name="Calculator",
serviceName="CalculatorService",
targetNamespace="http://ca/math/Calculator1"
)
public class Calculator {
/**
* Adds two integers.
* @param x first integer.
* @param y second integer.
* @return the sum of two integers.
*/
@WebMethod(operationName="add", action="urn:Add")
public int add(int x, int y) {
return x+y;
}
/**
* Subtracts two integers.
* @param x first integer.
* @param y second integer.
* @return the subtraction of two integers.
*/
@WebMethod(operationName="subtract", action="urn:Substract")
public int subtract(int x, int y) {
return x-y;
}
}
Here's the error:
<error>
<description>Unable to generate WSDL 1.1 for this service</description>
<reason>
If you wish Axis2 to automatically generate the WSDL 1.1, then please +set
useOriginalwsdl as false in your services.xml
</reason>
javax.xml.ws.WebServiceException: Error occurred generating WSDL file for
Web service implementation class {ca.gc.agr.math.calculator.Calculator}:
{java.lang.ClassNotFoundException:
com.sun.tools.ws.spi.WSToolsObjectFactory}
at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:187)
at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initialize(JAXWSRIWSDLGenerator.java:371)
at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(JAXWSRIWSDLGenerator.java:364)
at
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1322)
at
org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:287)
at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:242)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException:
com.sun.tools.ws.spi.WSToolsObjectFactory
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:166)
... 21 more
</error>
Cheers,
Bill
--
View this message in context: http://www.nabble.com/Error-on-auto-generated-wsdl-using-JAXWSDeployer...-tp19997520p19997520.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: Error on auto-generated wsdl using JAXWSDeployer...
Posted by Upananda <su...@kodiaknetworks.com>.
Hi,
I am also facing the same issue with myservices.jar deployments with
annotations and without services.xml
file.
Though the same works fine if I bundle my services as .aar file along with a
services.xml file.
The whole idea is to avoid the services.xml file using the annotations.
Thanks,
Upananda
--
View this message in context: http://www.nabble.com/Error-on-auto-generated-wsdl-using-JAXWSDeployer...-tp19997520p21413151.html
Sent from the Axis - User mailing list archive at Nabble.com.