Failed Tech Hype: SOAP Web Services
Many used SOAP wrongly. If you still have to work (programming/testing) with SOAP, there is a much simpler way.
Table of Contents:
· What’s Wrong with SOAP?
∘ 1. Every time WSDL changes, a re-generation of Stub classes.
∘ 2. Real-life SOAP Service Request/Response are large and complex
∘ 3. Most programmers don’t know XML Schema well.
· Why was SOAP so hyped?
· Early Wisdom
· How did I work with SOAP?
SOAP (Simple Object Access Protocol) is a messaging protocol that allows exchanging of structured information in XML between computer applications. SOAP is often associated with the term “Web Service”. A web service differs from a website in that a web service provides information consumable by software rather than humans.
SOAP was hugely popular between 2004 to 2011, after that it was gradually being replaced by RESTful web service. Nowadays, there are still many SOAP web services are being used. Proof of that is: SmartBear acquired SoapUI, a testing tool mainly for testing SOAP web services, in 2011. Later, SmartBear even released a more expensive product: ReadyAPI. By the way, I don’t use these products, they have made API testing harder and more expensive. I will post an article on how to test SOAP/REST web services efficiently, and totally free. (If you can’t wait, check out my book: API Testing Recipes in Ruby).
What’s Wrong with SOAP?
Despite its name starting with ‘Simple’, SOAP is complex.
Let’s start from the objective: a computer program retrieves data from another remotely, like this: getting a book detail via an ISBN. There must be communication, it works as below:
So far, it is not complex, another form of XML-RPC. However, some software architects think it will be cooler to let the programmer code it just like a normal function.
// soapService defined above
BookDetail detail = soapService.retrieveBook("1505882893")
detail.getPrice(); // => 24.95