Java 11 package javax.xml.soap does not exist

We Are Going To Discuss About Java 11 package javax.xml.soap does not exist . So lets Start this Java Article.

Java 11 package javax.xml.soap does not exist

  1. Java 11 package javax.xml.soap does not exist

    JAX-WS is no longer bundled with Java 11.
    According to the release notes, Java 11 removed the Java EE modules:
    java.xml.ws (JAX-WS, plus the related technologies SAAJ and Web Services Metadata) - REMOVED

  2. Java 11 package javax.xml.soap does not exist

    JAX-WS is no longer bundled with Java 11.
    According to the release notes, Java 11 removed the Java EE modules:
    java.xml.ws (JAX-WS, plus the related technologies SAAJ and Web Services Metadata) - REMOVED

Solution 1

JAX-WS removed from Java 11

JAX-WS is no longer bundled with Java 11.

According to the release notes, Java 11 removed the Java EE modules:

java.xml.ws (JAX-WS, plus the related technologies SAAJ and Web Services Metadata) - REMOVED
  • Java 8 – OK
  • Java 9 – DEPRECATED
  • Java 10 – DEPRECATED
  • Java 11 – REMOVED

See JEP 320 for more info.

You can fix the issue by using alternate versions of the Java EE technologies. Simply add a com.sun.xml.ws : jaxws-ri Maven artifact that contains the technologies you need:

<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-ri</artifactId>
  <version>2.3.2</version>
  <type>pom</type>
</dependency>

Jakarta EE 8 update (Mar 2020)

Instead of using old JAX-WS module you can fix the issue by using Jakarta XML Web Services from Jakarta EE 8:

<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.3</version>
  <scope>runtime</scope>
</dependency>

Jakarta EE 9 update (Nov 2020)

Use latest release of Jakarta XML Web Services 3.0:

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

Note: change javax.* imports to jakarta.*

Original Author edited May 6, 2021 at 10:30 Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

Siddharth

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment