This document provides an overview of web services, including RESTful and SOAP-based approaches. It defines web services as application components that communicate using open protocols and can be consumed by any application. It explains that web services typically use HTTP and common standards like SOAP, WSDL, and UDDI. RESTful web services are also introduced as a lightweight alternative to SOAP that uses HTTP methods to perform CRUD operations on resources identified by URLs. Examples are given comparing the usage of SOAP and RESTful approaches.
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
REST -Web services
1. WEB SERVICES
THEORY & IMPLEMENTATION
Abdul Munim Dibosh (abdulmunim.buet@gmail.com)
CSE, BUET
2. What’s Web Service
• Application components
• Communicate using open protocols
• Self contained and self describing
• Can be consumed by any application
3. How does it work
• Internet protocol used : HTTP
• Platform Elements:
SOAP(Simple Object Access Protocol)
UDDI(Universal Description, Discovery & Integration)
WSDL(Web Services Description Language)
4. Why Web Service
• Interoperability – Web services enable exchanging data
between different applications and platforms.
• Can publish function or message to rest of the world
• Reusable application components
6. SOAP
• Simple Object Access Protocol
• Communication protocol
• Format for sending messages
• Platform independent
• Based on XML
• Allows to get around firewalls
7. WSDL
• Web Services Description Language
• Based on XML
• Used to describe web services
• Used to locate web services
9. Introducing REST
• REST stands for Representational State Transfer
• Large impact ; almost displaced SOAP and WSDL
10. RESTful Web Services
• Unique URL is representation of some object
• Uses HTTP for CRUD(Create/Read/Update/Delete)
operations
11. REST vs SOAP
• Rest
• Light-Weight
• Human readable
• Easy to build
• Access named resources through a single consistent interface
• Permits different data formats
• Example: getUser(Id)
• Soap
• Easy to consume-sometimes
• Rigid-adheres to a contract (Standard Specification)
• Exposes operations
• Permits XML
• Example: performTask(Id,task)
12. The main idea
• REST – Exposes a resource(object) via GET,POST etc.
What you will do with that object is up to you.
• SOAP - Exposes named operations to perform business
logic.
13. Example-SOAP
• Query the details of a given User-
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-en coding">
<soap:body pb="http://www.acme.com/phonebook"> <pb:GetUserDetails>
<pb:UserID>12345</pb:UserID> </pb:GetUserDetails>
</soap:Body> </soap:Envelope>
14. Example-REST
• Query the details of a given User-
http://www.acme.com/phonebook/UserDetails/12345