Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SOAP client on Java 11

I need to consume a SOAP service, and I have seen on the spring tutorial that my java classes for consuming and receiving the services, can be automatically generated using a tool or a framework.

The thing is most tutorials rely on wsimport tool from the JDK...and after lots of hours trying I found out that for Java 11, this is deprecated. After this I found this ,this, and this talking about some workarounds for this problem. I tried all of them, but my gradle.build starts generating dependencies issues around this libraries. I have tried to exclude the problematic libraries but it doesn´t solve the issue.

So I'm wondering how can I generate my SOAP client classes on a not so patched way?

Additional info: It's a contract first approach, the service is on the web and it is a ?wsdl url.

like image 302
José Ripoll Avatar asked Aug 07 '26 20:08

José Ripoll


1 Answers

At the end, I just followed this tutorial, which was simple enough and allowed me to consume a SOAP web service and then build an XML file to process the info retrieved. Hopefully Java 11 will have some better support for this type of service on the near future, but meanwhile I solved my problem and maybe this post can be useful to someone with a similar task to perform.

like image 145
José Ripoll Avatar answered Aug 10 '26 09:08

José Ripoll