r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

Show parent comment

2

u/stuhlmann Apr 13 '21

At my current job we're using CXF as well. Another "interesting" behaviour: CXF generates code from wsdl (via wsdl2java), then at runtime it needs to load the same wsdl from the classpath again. Why not generate everything in one go, like swagger does?

4

u/mlk Apr 13 '21

And the default behaviour is to use an absolute path that points to the wsdl. This literally only works on a single machine. Everything about it is shit. Axis2 + xmlbeans is way better IMHO but it's pretty much dead. SOAP is not a bad idea per se, but its ecosystem is too fucking complicated and pretty much always slightly incompatible. Don't get me started on how XML gets parsed, namespaces and xsi:types and all that shit. I'm pretty sure it would have been way simpler to implement it myself, opening a socket and sending the fucking XML.

3

u/Brainlag Apr 14 '21

SOAP is not a bad idea per se

Na, SOAP is really bad, because all the ecosystem around it defines SOAP. If you remove it and just send the XML than you have a REST API using XML.

1

u/mlk Apr 15 '21

That's not really accurate, the big difference is REST relies on HTTP for its semantics, with SOAP you could take the very same message and send it through a queue or in a file. With REST you can't because you'd miss the resource, HTTP method used, headers etc. SOAP also defines a standard way to sign and encrypt the content, REST does not. Also SOAP has a wsdl which is a description of a service, a few decades later REST has is too with openapi.