top of page
hand-businesswoman-touching-hand-artificial-intelligence-meaning-technology-connection-go-

The Magic Behind Your Favourite Apps: An Easy Guide to Web Services, APIs, SOAP, REST, WSDL

Intro: Behind the App Magic


Ever wondered how you receive your emails or check the latest sports scores on your mobile apps? Well, let's discover the magical world behind this - the realm of web services, APIs, SOAP, REST, WSDL, and UDDI.


Web Services & APIs: Your Digital Waiters


Imagine a web service as a master chef in a restaurant's kitchen, and you, the customer. You're craving for some mouthwatering dishes (or in this case, data). However, you can't step into the kitchen to cook it yourself. So, you need a waiter, who is our API (Application Programming Interface) in this story. The API carries your 'order' (request for data) to the 'kitchen' (web service) and brings your 'meal' (data) back to you.


SOAP & REST: The Ways Your Order is Delivered


Your order can be delivered to the kitchen in two ways - through SOAP (Simple Object Access Protocol) or REST (Representational State Transfer).


SOAP is like a mailman. It wraps up your 'order' in a neat package and safely delivers it to the 'kitchen'. Here's a sample of how a SOAP message looks like:

Sample code is sourced from https://www.w3schools.com/XML/xml_soap.asp

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><m:GetPrice xmlns:m="http://www.example.org/stock"><m:StockName>IBM</m:StockName></m:GetPrice></soap:Body></soap:Envelope>

On the flip side, REST is more like a bicycle messenger - fast and efficient. It uses everyday web language to deliver your 'order'. Here's how a REST request might look, using JSON, a web-friendly way to format data:

{"firstName": "John","lastName": "Doe","email": "john.doe@example.com"}

WSDL: The Menu for Your API Waiter


But how does the API waiter know what the kitchen can 'cook'? WSDL (Web Services Description Language) helps with that! It's like a menu, telling the API what dishes the web service can prepare.


UDDI: The Phone Book for Web Services


Finally, we have UDDI (Universal Description, Discovery, and Integration), like a phone book where all web services are listed. So, if your API waiter is looking for a specific kitchen (web service), it can look it up in the UDDI.


A Picture is Worth a Thousand Words

Let's illustrate these interactions with a sequence diagram:



In this diagram:

  1. The User (you) sends a Request for data to the API (waiter).

  2. The API sends this request to the Web Service (kitchen) using either SOAP or REST.

  3. The Web Service processes the request and sends the data back to the API.

  4. The API brings the data back to you, the User.

Conclusion

Next time you check your email or weather app, remember the invisible waiters (APIs) and chefs (web services) working behind the scenes. These processes involving web services, APIs, SOAP, REST, WSDL, and UDDI ensure you get your digital 'meals' hot and ready!

54 views0 comments

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page