The monster thread continues. Ted writes:
But the problem is that semi-structured and unknown data is going to be hard to consume in any meaningful format—otherwise why have Schema at all? I need to know what I’m receiving, or else I have to infer the types on the fly, and that means I’m back to writing the same damn parser code that I had to write when consuming flat-files. I REFUSE to go back to that, theories about SOA and Web services be damned.
I think what Ted is missing is that you don’t necessarily need to understand everything in a message, just the parts you are interested in. I believe there’s a lot of cases - in fact, the interesting ones - where you will be interacting with the message on a message level, e.g. extract a few items, add some, forward everything to somebody else, store it or whatever. This kind of interaction shouldn’t be burdended with the runtime overhead and the tight coupling introduced by XML Schema-driven XML-to-objects (de)serialization. Sometimes this does, of course, make a lot of sense, but I believe the argument is similar to the one about whether SQL-level or object-relational mapping APIs are better: There is no single answer, just different scenarios and trade-offs.