0

I am trying to deploy a very simple SOAP web service to Tomcat 10 (version 10.1.7), but despite many attempts I've had no luck so far.

I suspect there is something wrong with my deployment descriptor, sun-jaxws.xml, and I would like to hear if anyone has had success with deployment of a JAX-WS 4.0 SOAP web service on Tomcat 10.1.

Thank you very much!

Each time I try to deploy I get the following exception (the name of the service is SayHelloC):

05-Apr-2023 14:05:08.316 SEVERE [Catalina-utility-2] com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate WSSERVLET11: failed to parse runtime descriptor: The serviceName cannot be retrieved from an interface. class com.ccieurope.ee10.webservices.sayhello.SayHelloC com.sun.xml.ws.model.RuntimeModelerException: The serviceName cannot be retrieved from an interface. class com.ccieurope.ee10.webservices.sayhello.SayHelloC at com.sun.xml.ws.model.RuntimeModeler.getServiceName(RuntimeModeler.java:1472) at com.sun.xml.ws.server.EndpointFactory.getDefaultServiceName(EndpointFactory.java:551) at com.sun.xml.ws.server.EndpointFactory.getDefaultServiceName(EndpointFactory.java:533) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:239) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:149) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:110) at com.sun.xml.ws.transport.http.servlet.WSServletContainerInitializer.onStartup(WSServletContainerInitializer.java:42) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4875) ...

It seems that something is wrong in the deployment descriptor file, sun-jaxws.xml, since the servlet is trying to parse this file on deployment.

Unfortunately I can only find some rather old examples of what this file should look like. Has anyone got a small sample project that works with JAX-WS 4.0 and Tomcat 10.1?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555

1 Answers1

0

It turns out that the problem is that the implementation class, com.ccieurope.ee10.webservices.sayhello.SayHelloC, which is specified in the deployment descriptor (sun-jaxws.xml), is an interface class.

Changing the descriptor to point to the actual implementation class made it possible to deploy and use the web service on Tomcat 10.