SlideShare ist ein Scribd-Unternehmen logo
1 von 18
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Node.js Express Framework
Node.js Express FrameworkNode.js Express Framework
Node.js Express Framework
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
Web api
Web apiWeb api
Web api
 
REST API Design & Development
REST API Design & DevelopmentREST API Design & Development
REST API Design & Development
 
WSDL
WSDLWSDL
WSDL
 
Api application programming interface
Api application programming interfaceApi application programming interface
Api application programming interface
 
API Presentation
API PresentationAPI Presentation
API Presentation
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Introduction to fragments in android
Introduction to fragments in androidIntroduction to fragments in android
Introduction to fragments in android
 
Soap vs rest
Soap vs restSoap vs rest
Soap vs rest
 
Angular overview
Angular overviewAngular overview
Angular overview
 
Javascript
JavascriptJavascript
Javascript
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
MVC Architecture
MVC ArchitectureMVC Architecture
MVC Architecture
 
Rest API
Rest APIRest API
Rest API
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
REST API
REST APIREST API
REST API
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
API
APIAPI
API
 

Ähnlich wie Introduction to APIs (Application Programming Interface)

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 APIsAparna 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 Archsudharani127782
 
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 servicesAparna Sharma
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service IntroductionMadhukar 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 APIPankaj Bajaj
 
APIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfWilliamELKAIMPhd
 
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 2015Jackson 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.pdfAparna Sharma
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.pptKGSCSEPSGCT
 
zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restfultom_li
 

Ähnlich wie 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
 
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
 
Wt unit 6 ppts web services
Wt unit 6 ppts web servicesWt unit 6 ppts web services
Wt unit 6 ppts web services
 
Apitesting.pptx
Apitesting.pptxApitesting.pptx
Apitesting.pptx
 
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
 
Web services
Web servicesWeb services
Web services
 
Web Programming
Web ProgrammingWeb Programming
Web Programming
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Rest web service
Rest web serviceRest web service
Rest web service
 
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
 
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
 
APIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdfAPIs Design - Creation - Management.pdf
APIs Design - Creation - Management.pdf
 
APIs enabling IoT
APIs enabling IoT APIs enabling IoT
APIs enabling IoT
 
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
 
Salesforce Integration
Salesforce IntegrationSalesforce Integration
Salesforce Integration
 
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
 
API.pdf
API.pdfAPI.pdf
API.pdf
 
REST Introduction.ppt
REST Introduction.pptREST Introduction.ppt
REST Introduction.ppt
 
Api 101
Api 101Api 101
Api 101
 
zendframework2 restful
zendframework2 restfulzendframework2 restful
zendframework2 restful
 

Kürzlich hochgeladen

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 

Kürzlich hochgeladen (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 

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.