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

Updated examples and guides from Spring Framework 6 and jakarta classes? #57

Open huima opened 1 year ago

huima commented 1 year ago

Hi,

wondering if there is already work being done on updating creating and consuming SOAP services with new versions of the Spring Framework 6 and Spring Boot 3?

At the moment current example projects naturally fail if tried under 3.0.0 releases, as dependencies have been updated to jakarta 9+ classes.

huima commented 1 year ago

I will answer to myself.

Required only updating the plugin to use new version: jaxb "com.sun.xml.bind:jaxb-xjc:4.0.1"

And everything works as expected with Spring Boot 3.

New plugin generates jakarta.* namespace classes.

bitsofinfo commented 1 year ago
Execution failed for task ':genJaxb'.
> java.lang.AssertionError: jakarta.xml.bind.JAXBException: Implementation of Jakarta XML Binding-API has not been found on module path or classpath.
   - with linked exception:
  [java.lang.ClassNotFoundException: org.glassfish.jaxb.runtime.v2.ContextFactory]
ScriptKiddie47 commented 1 year ago

I will answer to myself.

Required only updating the plugin to use new version: jaxb "com.sun.xml.bind:jaxb-xjc:4.0.1"

And everything works as expected with Spring Boot 3.

New plugin generates jakarta.* namespace classes.

Thank you for sharing this !

Buzzardo commented 11 months ago

We plan to rewrite this guide soon. Using the tools made available by Spring Framework 6 and Spring Boot 3 is definitely part of that. I'll leave this issue open as a reminder, though. Paging @gregturn