Migration JAXWS application from Java 8 to Java 11

We Are Going To Discuss About Migration JAXWS application from Java 8 to Java 11. So lets Start this Java Article.

Migration JAXWS application from Java 8 to Java 11

  1. Migration JAXWS application from Java 8 to Java 11

    The documentation regarding this removal (JEP 320) has a topic called Risks and Assumptions followed by Java EE modules in which they suggest alternatives for the removals, like jaxws-ri and jaxb-ri.

  2. Migration JAXWS application from Java 8 to Java 11

    The documentation regarding this removal (JEP 320) has a topic called Risks and Assumptions followed by Java EE modules in which they suggest alternatives for the removals, like jaxws-ri and jaxb-ri.

Solution 1

Note sure about sprint boot, but to get JAXWS working in Java 11, I used

<profiles>
    <!-- add back the jaxws SOAP dependendies which were removed in JDK11 -->
    <profile>
        <id>jdk11</id>
        <activation>
            <jdk>[11,)</jdk>
        </activation>
        <!-- tested working with OpenJDK 11.0.8 -->
        <dependencies>
            <dependency>
                <groupId>com.sun.xml.ws</groupId>
                <artifactId>jaxws-rt</artifactId>
                <version>2.3.3</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.ws</groupId>
                <artifactId>rt</artifactId>
                <version>2.3.3</version>
            </dependency>
        </dependencies>
    </profile>
</profiles>

Original Author user1791121 Of This Content

Solution 2

The documentation regarding this removal (JEP 320) has a topic called Risks and Assumptions followed by Java EE modules in which they suggest alternatives for the removals, like jaxws-ri and jaxb-ri.

In my case I was using the javax.jws package in Java 8 and it got removed in Java 11. So as the JEP suggests, I just had to add the following dependency to get it working again on Java 11:

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

In your case you may need other dependencies as well, just take a look at the JEP suggestions.

Original Author Rafael Renan Pacheco 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