XML Web Services modules

According to the release-notes, Java 11 removed the java.xml.ws modules (JAX-WS/SOAP) that are part of Jakarta EE and were present in Java 10 and older. See JEP 320 for more info.

If you need these modules outside of a Jakarta EE container, use standalone versions of these modules. You can add additional Maven dependencies that contain the classes you need. Get those modules:

You don’t need to do anything to deploy your application to a Jakarta EE server if you already have an application WAR or EAR file. GlassFish and other servers already contain the JAX-WS modules and your application can work on Java 11 or older in the same way as it worked on Java 8 before.

Eclipse GlassFish 7

You can get all the required modules from a GlassFish installation. In GlassFish 7, you can find them at this location:

  • Jakarta EE 10 WS + SOAP API: glassfish/modules/webservices-api-osgi.jar
  • Jakarta EE 10 Activation API (required by the WS API): glassfish/modules/jakarta.activation-api.jar
  • Implementation: glassfish/modules/webservices-osgi.jar

If you need to add them as a Maven dependency, use the Jakarta EE 10 ones as described below.

Jakarta EE 10

With Jakarta EE 10, use Jakarta XML Web Services 4.0.

Standalone JAR files

Maven dependencies

<dependency>
  <groupId>jakarta.xml.ws</groupId>
  <artifactId>jakarta.xml.ws-api</artifactId>
  <version>4.0.1</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>4.0.2</version>
  <scope>runtime</scope>
</dependency>

Jakarta EE 9

With Jakarta EE 9, use Jakarta XML Web Services 3.0:

Standalone JAR files

Maven dependencies

<dependency>
  <groupId>jakarta.xml.ws</groupId>
  <artifactId>jakarta.xml.ws-api</artifactId>
  <version>3.0.1</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>3.0.2</version>
  <scope>runtime</scope>
</dependency>

Jakarta EE 8

With Jakarta EE 8, use Jakarta XML Web Services 2.3. This version is the last one that uses the Java package javax.xml.ws and not jakarta.xml.ws.

Standalone JAR files

Maven dependencies

<dependency>
  <groupId>jakarta.xml.ws</groupId>
  <artifactId>jakarta.xml.ws-api</artifactId>
  <version>2.3.3</version>
</dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-rt</artifactId>
  <version>2.3.7</version>
  <scope>runtime</scope>
</dependency>