SOAP had a lot of the right ideas. It didn't fail because the concept behind it was bad. The main reason it failed was that, although the "S" stands for "simple", it wasn't. Maybe it was simple compared to CORBA or something.
I was never able to write a complete SOAP response, and I don't think I was once able to predict one without running first (parsing after the fact is easier, that I can do).