Hacker News new | ask | show | jobs
by bunnymancer 2888 days ago
Had a client just last month that were doing SOAP wrong somehow...

Required a SOAP message, that contained no XML after the message tag, but instead the entire message body was to be a JSON, and responded with a JSON if something was wrong, and a fully formed SOAP message if things were Ok.

That and the guys that handle your money use the Http status code as their personal error messages. Except when the error is on their end, in which case they return 200 and a JSON with an error message.

There are plenty of ways to do REST wrong, so let's not lump that into the people that make blog posts complaining about X because X is broken, and working just fine...

4 comments

The only thing stopping Tim Berners-Lee spinning in his grave, is that he's still alive.
Had a client just last month that were doing SOAP wrong somehow...

To be fair, I'm not sure there's any other way.

There are degrees, sort of like levels of hell. I think the universe implodes if you combine XML Encryption and SOAP SMTP binding. Actually that may explain things pretty well...
I'm guessing you're talking about Adyen. At least I've had exactly the same experience integrating with their API. It's an awful mismash. I even get responses with bool = 'true' in their json, but only sometimes. That's the string 'true' sometimes and othertimes json true.
Oh god, there's a ton of those in the Openstack API. Representative example from my own code that has to deal with it: the veryFlexibleUint64. https://github.com/sapcc/limes/blob/dac0e2019ed2a6006585c2a3...
I'm... I'm so sorry.
Well I hope the money was good at least. Yikes.