Migration JAXWS application from java 8 to java 11

前端 未结 2 555
感动是毒
感动是毒 2021-02-07 05:24

I am looking for compatible combination of org.apache.cxf:cxf-spring-boot-starter-jaxws with jaxws-api/jaxws-ri on java 10+.

Our application works fine on java 8. Also

相关标签:
2条回答
  • 2021-02-07 06:07

    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.

    0 讨论(0)
  • 2021-02-07 06:10

    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>
    
    0 讨论(0)
提交回复
热议问题