-1

`I am migrating a web application from Java8/Tomcat8 (J8T8) to Java11/Tomcat10 (J11T10). I have a handful of integrations with other systems that utilize SOAP/REST. Needless to say, this has been a journey. I've worked through several road blocks and have done the following so far:

  • Modified source code replacing "javax." with "jakarta."
  • Used eclipse migration tool to convert 3rd party jar byte code from "javax." to "jakarta."
  • Used maven plug-ins to invoke wsgen and wsimport on @WebService classes.

The latter leads leads to the main issue.

I am unable to find an example use of @WebService that makes exclusive use of jakarta packages, and is void of any use of, or dependency on, javax packages. With (J8T8) I use web.xml and sun-jaxws.xml to declare listeners that bind a URL to an implementation. With (J11T10) the listener class is no longer available, but all the literature states that annotations are all that is required to achieve binding. There are a plethora of examples of @WebServlet that are exclusively jakarta, but I've been searching for @WebService, and "javax" keeps showing up. My prototype is simple - but it doesn't respond. (Code to follow, as soon as I figure out how to format it)

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Dave
  • 9
  • 2
  • @WebService public interface TestWSInf { public String speak (); } – Dave Jul 20 '23 at 15:44
  • @WebService (endpointInterface = "com.test.TestWSInf",wsdlLocation="wsdl/TestWSSeervice.wsdl") public class TestWS implements TestWSInf { public String speak () { return "Hello"; } } – Dave Jul 20 '23 at 15:44
  • Welcome to Test Welcome to Test – Dave Jul 20 '23 at 15:45

1 Answers1

0

An example was right in front of me on the Eclipse foundation web site. https://eclipse-ee4j.github.io/metro-wsit/4.0.0/getting-started/getting-started.html This site includes a link to a sample project: https://eclipse-ee4j.github.io/metro-wsit/4.0.0/getting-started/download/wsit-jaxws-fromjava.zip Equally important is the step to include/install the shared libraries in Tomcat: https://repo1.maven.org/maven2/org/glassfish/metro/metro-standalone/4.0.0/metro-standalone-4.0.0.zip By following the tutorial I was able to get the sample to run. Once I had it running, I then applied equivalent configuration to my main project and was able to get that running. In order to do so, I used maven dependency tree to find out what existing dependencies I had to remove in favor of the jar files I downloaded into the shared lib.

Dave
  • 9
  • 2