spring-guides / gs-consuming-web-service

Consuming a SOAP web service :: Learn how to create a client that consumes a WSDL-based service
http://spring.io/guides/gs/consuming-web-service
Apache License 2.0
135 stars 166 forks source link

Migrate to Java 11 #34

Closed balasenthil-d closed 5 years ago

balasenthil-d commented 5 years ago

I am trying to use this example to generate jaxb classes for Java 11. I changed source and target in javac command in build.gradle to "1.11" from 1.8. But I am getting an error: java.lang.Error: java.lang.reflect.InvocationTargetException

Can someone tell me what changes I need to make ?

gregturn commented 5 years ago

Check out https://spring.io/blog/2018/09/19/spring-web-services-3-0-4-2-4-3-released for details about using Spring WS with Java 11.

gtiwari333 commented 5 years ago

I added the following dependencies in both producer and consumer sample and it works without any issues:


        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.messaging.saaj</groupId>
            <artifactId>saaj-impl</artifactId>
            <scope>runtime</scope>
        </dependency>

Both dependencies are managed by Spring Boot.

gregturn commented 5 years ago

Closing issue as it appears sufficiently dispositioned.