SlideShare a Scribd company logo
Introduction to APIs
VIBHAWA NIRMAL WIJERATHNA
Agenda
What is API ?
Types of API
What is web Service ?
Compare and Contrast API vs Web Services
SOAP Web Service?
REST Web Service?
Compare and Contrast SOAP vs REST
What is API ?
• API Stands for Application Programming Interface.
• API’s allows two applications to communicate with each other.
• It is a contract between the client and server.
• Client sends a request through the API and after performing the action the
API will send back a response to the client.
What is API ? Cont..
• APIs can be use for;
• Communication between services.
• Example : BankTransactions through third party apps.
• Access inbuilt hardware of a device.
• Example : access camera in a mobile.
Application API Assets
Types of Application Programming Interface (APIs)
• Private API
• Public API
• Partner API
Private API
• Private APIs are developed by own company to enhance the own products and
services.
• They have below characteristics ;
• Less Common.
• Exposed only to the internal systems.
• Used across internal development teams within the company.
Public API
• Public APIs are published publicly and that can be used by anyone(any third-party
user).
• They have below characteristics ;
• Publicly available without any access restriction.
• Used to communicate beyond the boundaries of the company.
• No need to necessarily have a business relationship with them.
Partner API
• Partner APIs are used by specific parties with whom the company agrees to share
data.
• They have below characteristics ;
• Are exposed to selected business partners.
• Used for communication between a company and its business partners.
What is Web Service ?
• Used for exchanging data between applications or systems with the
support of protocols and standards via internet.
• Main component of a web service is the data which is transferred
between the client and the server, and that is XML.
Web Service Architecture
Client Web ServerInternet
Client request services from web server and server response to client with the web service.
Compare and Contrast API vs Web Services
API Web Service
All APIs are not web services. All web services are APIs.
Responses are formatted using Web API's Media Type
Formatter into XML, JSON, or any other given format.
It supports XML.
Has a light-weight architecture. Does not have light-weight architecture.
Need a SOAP protocol to send or receive data over the
network.
Can be used by a client who understands JSON or XML. Can be used by any client who understands XML.
API can be used any style of communication. Web service uses three styles: REST, SOAP, and XML-RPC for
communication.
It provides support for the HTTP/s protocol: URL
Request/Response Headers, etc.
It provides supports only for the HTTP protocol.
Web Service API ?
• There are two major types of web services;
• SOAPWeb Services (Simple Object Access Protocol)
• REST Web Services (Representational StateTransfer )
What is SOAP?
• SOAP stands for Simple Object Access Protocol.
• A format for sending and receiving messages.
• SOAP is platform independent.
• Originally developed by Microsoft.
• The best way to communicate between applications is over HTTP.
• SOAP provides a way to communicate between applications running on different
operating systems, with different technologies and programming languages.
Building Blocks of SOAP?
• A SOAP message is an ordinary XML document which contains;
• An Envelope : identifies the XML document as a SOAP message
• A Header : contains header information
• A Body : contains call and response information
• A Fault : contains errors and status information
What is REST?
• REST stands for REpresentational StateTransfer.
• Relies on a stateless communications protocol most commonly, HTTP.
• REST structures data in XML,YAML, or any other format that is
machine-readable.
• Usually JSON is the most widely used format.
Basic REST Request?
• GET : read or retrieve data
• POST : add new data
• PUT : update existing data
• DELETE : delete data
Compare and Contrast SOAP vs REST
SOAP REST
Is a protocol. Is an architectural style.
SOAP can’t use REST because it is a protocol. REST can use SOAP web services because it is a concept
and can use any protocol like HTTP, SOAP.
Permits only XML. Permits many different data formats including plain text,
HTML, XML, and JSON.
Requires more bandwidth and more resources. Requires less bandwidth and less resources.
Supports both SMTP and HTTP protocols. Requires the use of HTTP only.
SOAP is more reliable than REST. REST is less secure than SOAP.
SOAP is faster than REST. REST is slower than SOAP.
SOAP defines its own security. RESTful web services inherit security measures from the
underlying transport.
Thank You
Vibhawa Nirmal Wijerathna
Ad

More Related Content

What's hot (20)

Webservices
WebservicesWebservices
Webservices
Gerard Sylvester
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
SaleemMalik52
 
Google App Engine ppt
Google App Engine  pptGoogle App Engine  ppt
Google App Engine ppt
OECLIB Odisha Electronics Control Library
 
Introduction to API
Introduction to APIIntroduction to API
Introduction to API
rajnishjha29
 
What's an api
What's an apiWhat's an api
What's an api
Jacques Ledoux
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
Halil Burak Cetinkaya
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
Surbhi Panhalkar
 
Web services
Web servicesWeb services
Web services
Akshay Ballarpure
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
Ashok Pundit
 
Google App Engine
Google App EngineGoogle App Engine
Google App Engine
Software Park Thailand
 
Firebase PPT
Firebase PPTFirebase PPT
Firebase PPT
JATIN GUPTA
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android application
Nikunj Dhameliya
 
Api presentation
Api presentationApi presentation
Api presentation
Tiago Cardoso
 
REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
Patrick Savalle
 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
 
Api types
Api typesApi types
Api types
Sarah Maddox
 
What is an Application programming interface(API)?
What is an Application programming interface(API)?What is an Application programming interface(API)?
What is an Application programming interface(API)?
Akmal Ali
 
Json
JsonJson
Json
krishnapriya Tadepalli
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
OECLIB Odisha Electronics Control Library
 

Similar to Introduction to APIs (Application Programming Interface) (20)

Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIs
Aparna Sharma
 
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archunit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
sudharani127782
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
NamanVerma88
 
What is the difference between an api and web services
What is the difference between an api and web servicesWhat is the difference between an api and web services
What is the difference between an api and web services
Aparna Sharma
 
Web services
Web servicesWeb services
Web services
smitha273566
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
VijayapriyaP1
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
Madhukar Kumar
 
Rest web service
Rest web serviceRest web service
Rest web service
Hamid Ghorbani
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
Pankaj Bajaj
 
Mini-Training: Let's have a rest
Mini-Training: Let's have a restMini-Training: Let's have a rest
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
 
APIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdf
WilliamELKAIMPhd
 
Api Penetration Testing and web app pentesting
Api Penetration Testing and web app pentestingApi Penetration Testing and web app pentesting
Api Penetration Testing and web app pentesting
<h1> hi</h1>
 
APIs enabling IoT
APIs enabling IoT APIs enabling IoT
APIs enabling IoT
Harish Vadada
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
Er. Prashant Veer Singh
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
Aparna Sharma
 
API.pdf
API.pdfAPI.pdf
API.pdf
KarthigeyanS13
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
KGSCSEPSGCT
 
Api 101
Api 101Api 101
Api 101
DrSimoneDiCola
 
Best practices and advantages of REST APIs
Best practices and advantages of REST APIsBest practices and advantages of REST APIs
Best practices and advantages of REST APIs
Aparna Sharma
 
unit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Archunit -4 spring web services like SOA Arch
unit -4 spring web services like SOA Arch
sudharani127782
 
What is the difference between an api and web services
What is the difference between an api and web servicesWhat is the difference between an api and web services
What is the difference between an api and web services
Aparna Sharma
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
Madhukar Kumar
 
Overview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB APIOverview of Rest Service and ASP.NET WEB API
Overview of Rest Service and ASP.NET WEB API
Pankaj Bajaj
 
APIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdf
WilliamELKAIMPhd
 
Api Penetration Testing and web app pentesting
Api Penetration Testing and web app pentestingApi Penetration Testing and web app pentesting
Api Penetration Testing and web app pentesting
<h1> hi</h1>
 
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015Phalcon 2 High Performance APIs - DevWeekPOA 2015
Phalcon 2 High Performance APIs - DevWeekPOA 2015
Jackson F. de A. Mafra
 
Modern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdfModern REST API design principles and rules.pdf
Modern REST API design principles and rules.pdf
Aparna Sharma
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
KGSCSEPSGCT
 
Ad

Recently uploaded (20)

Streamline Your Manufacturing Data. Strengthen Every Operation.
Streamline Your Manufacturing Data. Strengthen Every Operation.Streamline Your Manufacturing Data. Strengthen Every Operation.
Streamline Your Manufacturing Data. Strengthen Every Operation.
Aparavi
 
What Do Candidates Really Think About AI-Powered Recruitment Tools?
What Do Candidates Really Think About AI-Powered Recruitment Tools?What Do Candidates Really Think About AI-Powered Recruitment Tools?
What Do Candidates Really Think About AI-Powered Recruitment Tools?
HireME
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
Cryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptxCryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptx
riyageorge2024
 
Beyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraftBeyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraft
Dmitrii Ivanov
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Protect HPE VM Essentials using Veeam Agents-a50012338enw.pdf
Protect HPE VM Essentials using Veeam Agents-a50012338enw.pdfProtect HPE VM Essentials using Veeam Agents-a50012338enw.pdf
Protect HPE VM Essentials using Veeam Agents-a50012338enw.pdf
株式会社クライム
 
Sequence Diagrams With Pictures (1).pptx
Sequence Diagrams With Pictures (1).pptxSequence Diagrams With Pictures (1).pptx
Sequence Diagrams With Pictures (1).pptx
aashrithakondapalli8
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Time Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project TechniquesTime Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project Techniques
Livetecs LLC
 
GDS SYSTEM | GLOBAL DISTRIBUTION SYSTEM
GDS SYSTEM | GLOBAL  DISTRIBUTION SYSTEMGDS SYSTEM | GLOBAL  DISTRIBUTION SYSTEM
GDS SYSTEM | GLOBAL DISTRIBUTION SYSTEM
philipnathen82
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
How to avoid IT Asset Management mistakes during implementation_PDF.pdf
How to avoid IT Asset Management mistakes during implementation_PDF.pdfHow to avoid IT Asset Management mistakes during implementation_PDF.pdf
How to avoid IT Asset Management mistakes during implementation_PDF.pdf
victordsane
 
How to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryErrorHow to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
 
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint PresentationFrom Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
Shay Ginsbourg
 
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
OnePlan Solutions
 
Maximizing ROI with Odoo Staff Augmentation A Smarter Way to Scale
Maximizing ROI with Odoo Staff Augmentation  A Smarter Way to ScaleMaximizing ROI with Odoo Staff Augmentation  A Smarter Way to Scale
Maximizing ROI with Odoo Staff Augmentation A Smarter Way to Scale
SatishKumar2651
 
Streamline Your Manufacturing Data. Strengthen Every Operation.
Streamline Your Manufacturing Data. Strengthen Every Operation.Streamline Your Manufacturing Data. Strengthen Every Operation.
Streamline Your Manufacturing Data. Strengthen Every Operation.
Aparavi
 
What Do Candidates Really Think About AI-Powered Recruitment Tools?
What Do Candidates Really Think About AI-Powered Recruitment Tools?What Do Candidates Really Think About AI-Powered Recruitment Tools?
What Do Candidates Really Think About AI-Powered Recruitment Tools?
HireME
 
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World ExamplesMastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
Mastering Selenium WebDriver: A Comprehensive Tutorial with Real-World Examples
jamescantor38
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Solar-wind hybrid engery a system sustainable power
Solar-wind  hybrid engery a system sustainable powerSolar-wind  hybrid engery a system sustainable power
Solar-wind hybrid engery a system sustainable power
bhoomigowda12345
 
Cryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptxCryptocurrency Exchange Script like Binance.pptx
Cryptocurrency Exchange Script like Binance.pptx
riyageorge2024
 
Beyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraftBeyond the code. Complexity - 2025.05 - SwiftCraft
Beyond the code. Complexity - 2025.05 - SwiftCraft
Dmitrii Ivanov
 
Robotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptxRobotic Process Automation (RPA) Software Development Services.pptx
Robotic Process Automation (RPA) Software Development Services.pptx
julia smits
 
Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025Memory Management and Leaks in Postgres from pgext.day 2025
Memory Management and Leaks in Postgres from pgext.day 2025
Phil Eaton
 
Protect HPE VM Essentials using Veeam Agents-a50012338enw.pdf
Protect HPE VM Essentials using Veeam Agents-a50012338enw.pdfProtect HPE VM Essentials using Veeam Agents-a50012338enw.pdf
Protect HPE VM Essentials using Veeam Agents-a50012338enw.pdf
株式会社クライム
 
Sequence Diagrams With Pictures (1).pptx
Sequence Diagrams With Pictures (1).pptxSequence Diagrams With Pictures (1).pptx
Sequence Diagrams With Pictures (1).pptx
aashrithakondapalli8
 
Artificial hand using embedded system.pptx
Artificial hand using embedded system.pptxArtificial hand using embedded system.pptx
Artificial hand using embedded system.pptx
bhoomigowda12345
 
Time Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project TechniquesTime Estimation: Expert Tips & Proven Project Techniques
Time Estimation: Expert Tips & Proven Project Techniques
Livetecs LLC
 
GDS SYSTEM | GLOBAL DISTRIBUTION SYSTEM
GDS SYSTEM | GLOBAL  DISTRIBUTION SYSTEMGDS SYSTEM | GLOBAL  DISTRIBUTION SYSTEM
GDS SYSTEM | GLOBAL DISTRIBUTION SYSTEM
philipnathen82
 
Why Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card ProvidersWhy Tapitag Ranks Among the Best Digital Business Card Providers
Why Tapitag Ranks Among the Best Digital Business Card Providers
Tapitag
 
How to avoid IT Asset Management mistakes during implementation_PDF.pdf
How to avoid IT Asset Management mistakes during implementation_PDF.pdfHow to avoid IT Asset Management mistakes during implementation_PDF.pdf
How to avoid IT Asset Management mistakes during implementation_PDF.pdf
victordsane
 
How to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryErrorHow to Troubleshoot 9 Types of OutOfMemoryError
How to Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
 
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint PresentationFrom Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
From Vibe Coding to Vibe Testing - Complete PowerPoint Presentation
Shay Ginsbourg
 
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
Surviving a Downturn Making Smarter Portfolio Decisions with OnePlan - Webina...
OnePlan Solutions
 
Maximizing ROI with Odoo Staff Augmentation A Smarter Way to Scale
Maximizing ROI with Odoo Staff Augmentation  A Smarter Way to ScaleMaximizing ROI with Odoo Staff Augmentation  A Smarter Way to Scale
Maximizing ROI with Odoo Staff Augmentation A Smarter Way to Scale
SatishKumar2651
 
Ad

Introduction to APIs (Application Programming Interface)

  • 1. Introduction to APIs VIBHAWA NIRMAL WIJERATHNA
  • 2. Agenda What is API ? Types of API What is web Service ? Compare and Contrast API vs Web Services SOAP Web Service? REST Web Service? Compare and Contrast SOAP vs REST
  • 3. What is API ? • API Stands for Application Programming Interface. • API’s allows two applications to communicate with each other. • It is a contract between the client and server. • Client sends a request through the API and after performing the action the API will send back a response to the client.
  • 4. What is API ? Cont.. • APIs can be use for; • Communication between services. • Example : BankTransactions through third party apps. • Access inbuilt hardware of a device. • Example : access camera in a mobile. Application API Assets
  • 5. Types of Application Programming Interface (APIs) • Private API • Public API • Partner API
  • 6. Private API • Private APIs are developed by own company to enhance the own products and services. • They have below characteristics ; • Less Common. • Exposed only to the internal systems. • Used across internal development teams within the company.
  • 7. Public API • Public APIs are published publicly and that can be used by anyone(any third-party user). • They have below characteristics ; • Publicly available without any access restriction. • Used to communicate beyond the boundaries of the company. • No need to necessarily have a business relationship with them.
  • 8. Partner API • Partner APIs are used by specific parties with whom the company agrees to share data. • They have below characteristics ; • Are exposed to selected business partners. • Used for communication between a company and its business partners.
  • 9. What is Web Service ? • Used for exchanging data between applications or systems with the support of protocols and standards via internet. • Main component of a web service is the data which is transferred between the client and the server, and that is XML.
  • 10. Web Service Architecture Client Web ServerInternet Client request services from web server and server response to client with the web service.
  • 11. Compare and Contrast API vs Web Services API Web Service All APIs are not web services. All web services are APIs. Responses are formatted using Web API's Media Type Formatter into XML, JSON, or any other given format. It supports XML. Has a light-weight architecture. Does not have light-weight architecture. Need a SOAP protocol to send or receive data over the network. Can be used by a client who understands JSON or XML. Can be used by any client who understands XML. API can be used any style of communication. Web service uses three styles: REST, SOAP, and XML-RPC for communication. It provides support for the HTTP/s protocol: URL Request/Response Headers, etc. It provides supports only for the HTTP protocol.
  • 12. Web Service API ? • There are two major types of web services; • SOAPWeb Services (Simple Object Access Protocol) • REST Web Services (Representational StateTransfer )
  • 13. What is SOAP? • SOAP stands for Simple Object Access Protocol. • A format for sending and receiving messages. • SOAP is platform independent. • Originally developed by Microsoft. • The best way to communicate between applications is over HTTP. • SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.
  • 14. Building Blocks of SOAP? • A SOAP message is an ordinary XML document which contains; • An Envelope : identifies the XML document as a SOAP message • A Header : contains header information • A Body : contains call and response information • A Fault : contains errors and status information
  • 15. What is REST? • REST stands for REpresentational StateTransfer. • Relies on a stateless communications protocol most commonly, HTTP. • REST structures data in XML,YAML, or any other format that is machine-readable. • Usually JSON is the most widely used format.
  • 16. Basic REST Request? • GET : read or retrieve data • POST : add new data • PUT : update existing data • DELETE : delete data
  • 17. Compare and Contrast SOAP vs REST SOAP REST Is a protocol. Is an architectural style. SOAP can’t use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP. Permits only XML. Permits many different data formats including plain text, HTML, XML, and JSON. Requires more bandwidth and more resources. Requires less bandwidth and less resources. Supports both SMTP and HTTP protocols. Requires the use of HTTP only. SOAP is more reliable than REST. REST is less secure than SOAP. SOAP is faster than REST. REST is slower than SOAP. SOAP defines its own security. RESTful web services inherit security measures from the underlying transport.
  翻译: