Hacker News new | ask | show | jobs
by tomc1985 3476 days ago
The whole point of WSDL I thought was to look at statically-typed code and be able to dynamically generate the XML schema (and the XML) without human intervention -- that you can look at the code, know the types it uses and how it uses them, and then generate the WSDL based on that information?
1 comments

.NET and Java had good support for statically generating them (correctly even!) from code, but I never had the pleasure of integrating with such a service. Even in that case though, there were developers who used strings for everything instead of the correct types, didn't handle null correctly, etc.

Overwhelmingly in practice people wrote wsdls and xsds by hand, incorrectly, and treated them as secrets instead of publishing them along with the API endpoints. There was other "enterprise" BS during the XML craze too. In one case I even had to work around bugs in an IBM XML firewall, or its configuration. It was a nightmare[1].

[1] https://en.wikipedia.org/wiki/XML_appliance

They were a bit of a nightmare. Fun highlights:

    - IsBooleanPropertyIncludedBoolean
    - Massive, incredibly slow to build libraries
    - Check everything in case it was null
    - Never really sure what was wrong when it went wrong
There was quite a massive cognitive overhead and overkill for often querying one little thing.

Also they'd sometimes break and you'd have to hand edit the wsdl's to get them to work again (at least salesforce used to break theirs every now and again, the wsdl would be incompatible with the .Net tool because of certain character not escaping properly).

Well, when correctly implemented, working with WSDLs can be almost pleasant