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 Stadelmann Josef <jo...@axa-winterthur.ch> on 2012/03/26 12:02:48 UTC

[axis2-1.6.1] getting wsdl info froma jaxws service

What is the correct way to derive wsdl information from a JAXWS service?

I have deployed into WEB-INF\servicejars the sample
java_first_jaxws-1.6.1.jar; 

The JAXWS Deployer deploys it; no doubt, and it does not need a
service.xml for that.  

Whe I proceed with the examples README as said to get a wsdl using 
http://localhost:8080/axis2/services/HelloWorld?wsdl I get the error
shown below.

As we depend and deploy only a jar file into the servicejars directory,
there is no need to have a service.xml file at all, because all the
deployers do is interogating the java_first_jaxws-1.6.1.jar file's
annotations to setup axis2 internal structures to make use of the
service.

What is wrong? documentation or my understanding saying that we don't
need  a service.xml file in conjunction with JAXWS services?

<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 {demo.hw.server.HelloWorldImpl} at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generate
Wsdl(JAXWSRIWSDLGenerator.java:198) at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initiali
ze(JAXWSRIWSDLGenerator.java:390) at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(
JAXWSRIWSDLGenerator.java:383) at
org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1394
) at
org.apache.axis2.transport.http.ListingAgent.handleWSDLRequest(ListingAg
ent.java:327) at
org.apache.axis2.transport.http.ListingAgent.processListService(ListingA
gent.java:183) at
org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:290) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
98) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
2) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:588) at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.j
ava:396) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:886) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:908) at java.lang.Thread.run(Thread.java:662) Caused by:
java.lang.NoClassDefFoundError: com/sun/xml/ws/api/server/Container at
java.lang.Class.getDeclaredMethods0(Native Method) at
java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at
java.lang.Class.getMethod0(Class.java:2670) at
java.lang.Class.getMethod(Class.java:1603) at
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generate
Wsdl(JAXWSRIWSDLGenerator.java:179) ... 22 more Caused by:
java.lang.ClassNotFoundException: com.sun.xml.ws.api.server.Container at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1516) at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1361) ... 27 more 
  </error>

When I DO http://localhost:8080/axis2/services/HelloWorld?wsdl2 A NICE
WSDL OUTPUT IS CREATED.

Is it that output that I would have to derive ALL wsdl information, even
for my Visual Studio driven svcutil.exe generating stubs?

For any hints and clarifications thanksful

Josef