SlideShare ist ein Scribd-Unternehmen logo
1 von 11
SOAP vs. REST
SOAP to wash and REST to relax




           Antonio Loureiro Severien
                   FIB-UPC
What is SOAP?
ď‚— SOAP: Simple Object Access Protocol
  is a protocol for exchange of
  structured information on a
  decentralized and distributed platform
  using XML (eXtensible Markup
  Language)
ď‚— Works mainly with RPC (Remote
  Procedure Call) and HTTP (HyperText
  Transfer Protocol)
ď‚— HTTP makes SOAP go around
SOAP structure
           ď‚—   3 parts message: Envelope, Header,
               Body
                         POST /InStock HTTP/1.1
ENVELOPE                 Host: www.example.org
                         Content-Type: application/soap+xml; charset=utf-8       HTT
HEADER                   Content-Length: 299
                         SOAPAction: "http://www.w3.org/2003/05/soap-envelope"
                                                                                 P

                         <?xml version="1.0"?>
                         <soap:Envelope
BODY
                              xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
                          <soap:Header>
                          </soap:Header>
                          <soap:Body>
                           <m:GetStockPrice xmlns:m="http://www.example.org/stock">
 FAULT                      <m:StockName>IBM</m:StockName>
                           </m:GetStockPrice>
                          </soap:Body>
                         </soap:Envelope>
Simple Example
                                                    REQUEST
POST /InStock HTTP/1.1
Host: www.example.org
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?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-encoding">

<soap:Body xmlns:m="http://www.example.org/stock">
 <m:GetStockPrice>
  <m:StockName>IBM</m:StockName>
 </m:GetStockPrice>
</soap:Body>

</soap:Envelope>
Simple Example
                                                    RESPONSE
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: nnn

<?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-encoding">

<soap:Body xmlns:m="http://www.example.org/stock">
 <m:GetStockPriceResponse>
  <m:Price>34.5</m:Price>
 </m:GetStockPriceResponse>
</soap:Body>

</soap:Envelope>
SOAP Characteristics, Pros and
Cons
ď‚— Implements its own protocol
ď‚— Exposes pieces of application logic,
  operations
ď‚— Advantages
    â—¦ Versatile in use of different application
      protocols
    â—¦ Tunnels easily through firewalls due to the
      use of HTTP model
ď‚—   Disadvantages
    â—¦ Slower when using large XML messages
What is REST?
ď‚— REST: Representational State
  Transfer focuses on accessing named
  resources through a consistent
  interface
ď‚— Every resource has its representation
  (could be a document) and the
  resource state changes when some
  method is applied through a request
  using any vocabulary
Constraints and Principles
ď‚— Client-server
ď‚— Cacheable
ď‚— Stateless
ď‚— Uniform interface


ď‚— Identification of resources
ď‚— Manipulation of resources
ď‚— Self-descriptive messages
SOAP vs. REST
ď‚—   SOAP RPC: Application designers have
    to build up their protocol vocabulary
    whereas in REST it uses the well known
    vocabulary of the protocol in use
ď‚—   REST: Different data formats where
    SOAP only allows XML
ď‚—   REST has support for JSON, uses
    standard HTTP
ď‚—   REST better performance and scalability
ď‚—   SOAP reads cannot be cached
When to wash? When to
relax?
ď‚—   SOAP
    â—¦   WS-Security: enterprise security features
    â—¦   WS-AtomicTransactions: ACID compliant
    â—¦   WS-ReliableMessaging: end-to-end reliability
    â—¦   Ex.: smartphone app that communicates with
        a bank app on the web, need the previous
        implementations
ď‚—   REST
    â—¦ Lightweight
    â—¦ Less complex for maintenance
    ◦ Bring the “web” back to web services
Reference
ď‚—   http://www.w3schools.com/soap/default.asp
ď‚—   http://en.wikipedia.org/wiki/Representational_State
    _Transfer
ď‚—   http://en.wikipedia.org/wiki/SOAP
ď‚—   http://www.crummy.com/writing/RESTful-Web-
    Services/
ď‚—   http://tomayko.com/writings/rest-to-my-wife

Weitere ähnliche Inhalte

Was ist angesagt?

REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developersPatrick Savalle
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web servicesNeil Ghosh
 
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 | EdurekaEdureka!
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practicesAnkita Mahajan
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - APIChetan Gadodia
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecAdam Paxton
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web ServicesAngelin R
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service IntroductionMadhukar Kumar
 
Soap web service
Soap web serviceSoap web service
Soap web serviceNITT, KAMK
 
What Is Express JS?
What Is Express JS?What Is Express JS?
What Is Express JS?Simplilearn
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web APIhabib_786
 
Java Script ppt
Java Script pptJava Script ppt
Java Script pptPriya Goyal
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolMasud Rahman
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web ServicesKatrien Verbert
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsTessa Mero
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUDPrem Sanil
 

Was ist angesagt? (20)

REST-API introduction for developers
REST-API introduction for developersREST-API introduction for developers
REST-API introduction for developers
 
Intro to web services
Intro to web servicesIntro to web services
Intro to web services
 
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
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
Rest api standards and best practices
Rest api standards and best practicesRest api standards and best practices
Rest api standards and best practices
 
Introduction to REST - API
Introduction to REST - APIIntroduction to REST - API
Introduction to REST - API
 
WSDL
WSDLWSDL
WSDL
 
Designing APIs with OpenAPI Spec
Designing APIs with OpenAPI SpecDesigning APIs with OpenAPI Spec
Designing APIs with OpenAPI Spec
 
Restful Web Services
Restful Web ServicesRestful Web Services
Restful Web Services
 
Web service Introduction
Web service IntroductionWeb service Introduction
Web service Introduction
 
Simple object access protocol(soap )
Simple object access protocol(soap )Simple object access protocol(soap )
Simple object access protocol(soap )
 
Soap web service
Soap web serviceSoap web service
Soap web service
 
What Is Express JS?
What Is Express JS?What Is Express JS?
What Is Express JS?
 
REST & RESTful Web Services
REST & RESTful Web ServicesREST & RESTful Web Services
REST & RESTful Web Services
 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
 
Java Script ppt
Java Script pptJava Script ppt
Java Script ppt
 
SOAP--Simple Object Access Protocol
SOAP--Simple Object Access ProtocolSOAP--Simple Object Access Protocol
SOAP--Simple Object Access Protocol
 
SOAP-based Web Services
SOAP-based Web ServicesSOAP-based Web Services
SOAP-based Web Services
 
Understanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple StepsUnderstanding REST APIs in 5 Simple Steps
Understanding REST APIs in 5 Simple Steps
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 

Ă„hnlich wie Soap vs rest

WebServices introduction
WebServices introductionWebServices introduction
WebServices introductionprinceirfancivil
 
Introduction to WebServices
Introduction to WebServicesIntroduction to WebServices
Introduction to WebServicesAbdulImrankhan7
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPIMC Institute
 
Introduction to WebServices
Introduction to WebServicesIntroduction to WebServices
Introduction to WebServicesKhasim Cise
 
Mule Webservices
Mule WebservicesMule Webservices
Mule WebservicesShahid Shaik
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic OverviewKhan625
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic OverviewRajkattamuri
 
Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAPHayati Guvence
 
REST vs SOAP
REST vs SOAPREST vs SOAP
REST vs SOAPjavicid
 
Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access ProtocolSaatviga Sudhahar
 
Esri Web Applications February11 2011
Esri Web Applications February11 2011Esri Web Applications February11 2011
Esri Web Applications February11 2011delmelle
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptxssuserae0316
 
Intercloud interoperability
Intercloud interoperabilityIntercloud interoperability
Intercloud interoperabilitySam Johnston
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Kevin Lee
 

Ă„hnlich wie Soap vs rest (20)

Soap.doc
Soap.docSoap.doc
Soap.doc
 
WebServices introduction
WebServices introductionWebServices introduction
WebServices introduction
 
Introduction to WebServices
Introduction to WebServicesIntroduction to WebServices
Introduction to WebServices
 
Java Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAPJava Web Services [2/5]: Introduction to SOAP
Java Web Services [2/5]: Introduction to SOAP
 
Soap
SoapSoap
Soap
 
Introduction to WebServices
Introduction to WebServicesIntroduction to WebServices
Introduction to WebServices
 
Mule Webservices
Mule WebservicesMule Webservices
Mule Webservices
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic Overview
 
WebServices Basic Overview
WebServices Basic OverviewWebServices Basic Overview
WebServices Basic Overview
 
Introduction to SOAP
Introduction to SOAPIntroduction to SOAP
Introduction to SOAP
 
REST vs SOAP
REST vs SOAPREST vs SOAP
REST vs SOAP
 
Simple Object Access Protocol
Simple Object Access ProtocolSimple Object Access Protocol
Simple Object Access Protocol
 
CSG 2012
CSG 2012CSG 2012
CSG 2012
 
SOAP Overview
SOAP OverviewSOAP Overview
SOAP Overview
 
Esri Web Applications February11 2011
Esri Web Applications February11 2011Esri Web Applications February11 2011
Esri Web Applications February11 2011
 
Soap xp-wg
Soap xp-wgSoap xp-wg
Soap xp-wg
 
Web-Services!.pptx
Web-Services!.pptxWeb-Services!.pptx
Web-Services!.pptx
 
Web Services
Web ServicesWeb Services
Web Services
 
Intercloud interoperability
Intercloud interoperabilityIntercloud interoperability
Intercloud interoperability
 
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
Exchange of data over internet using web service(e.g., soap and rest) in SAS ...
 

Mehr von Antonio Severien

Scalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data StreamsScalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data StreamsAntonio Severien
 
Scalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data StreamsScalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data StreamsAntonio Severien
 
NoSQL: Cassadra vs. HBase
NoSQL: Cassadra vs. HBaseNoSQL: Cassadra vs. HBase
NoSQL: Cassadra vs. HBaseAntonio Severien
 
On Pragmatism and Scientific Freedom
On Pragmatism and Scientific FreedomOn Pragmatism and Scientific Freedom
On Pragmatism and Scientific FreedomAntonio Severien
 
Community cloud antonioseverien
Community cloud antonioseverienCommunity cloud antonioseverien
Community cloud antonioseverienAntonio Severien
 

Mehr von Antonio Severien (6)

Scalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data StreamsScalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data Streams
 
Scalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data StreamsScalable Distributed Real-Time Clustering for Big Data Streams
Scalable Distributed Real-Time Clustering for Big Data Streams
 
NoSQL: Cassadra vs. HBase
NoSQL: Cassadra vs. HBaseNoSQL: Cassadra vs. HBase
NoSQL: Cassadra vs. HBase
 
On Pragmatism and Scientific Freedom
On Pragmatism and Scientific FreedomOn Pragmatism and Scientific Freedom
On Pragmatism and Scientific Freedom
 
Community cloud antonioseverien
Community cloud antonioseverienCommunity cloud antonioseverien
Community cloud antonioseverien
 
Relational Cloud
Relational CloudRelational Cloud
Relational Cloud
 

KĂĽrzlich hochgeladen

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

KĂĽrzlich hochgeladen (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Soap vs rest

  • 1. SOAP vs. REST SOAP to wash and REST to relax Antonio Loureiro Severien FIB-UPC
  • 2. What is SOAP? ď‚— SOAP: Simple Object Access Protocol is a protocol for exchange of structured information on a decentralized and distributed platform using XML (eXtensible Markup Language) ď‚— Works mainly with RPC (Remote Procedure Call) and HTTP (HyperText Transfer Protocol) ď‚— HTTP makes SOAP go around
  • 3. SOAP structure ď‚— 3 parts message: Envelope, Header, Body POST /InStock HTTP/1.1 ENVELOPE Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 HTT HEADER Content-Length: 299 SOAPAction: "http://www.w3.org/2003/05/soap-envelope" P <?xml version="1.0"?> <soap:Envelope BODY xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:Header> </soap:Header> <soap:Body> <m:GetStockPrice xmlns:m="http://www.example.org/stock"> FAULT <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
  • 4. Simple Example REQUEST POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?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-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
  • 5. Simple Example RESPONSE HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?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-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
  • 6. SOAP Characteristics, Pros and Cons ď‚— Implements its own protocol ď‚— Exposes pieces of application logic, operations ď‚— Advantages â—¦ Versatile in use of different application protocols â—¦ Tunnels easily through firewalls due to the use of HTTP model ď‚— Disadvantages â—¦ Slower when using large XML messages
  • 7. What is REST? ď‚— REST: Representational State Transfer focuses on accessing named resources through a consistent interface ď‚— Every resource has its representation (could be a document) and the resource state changes when some method is applied through a request using any vocabulary
  • 8. Constraints and Principles ď‚— Client-server ď‚— Cacheable ď‚— Stateless ď‚— Uniform interface ď‚— Identification of resources ď‚— Manipulation of resources ď‚— Self-descriptive messages
  • 9. SOAP vs. REST ď‚— SOAP RPC: Application designers have to build up their protocol vocabulary whereas in REST it uses the well known vocabulary of the protocol in use ď‚— REST: Different data formats where SOAP only allows XML ď‚— REST has support for JSON, uses standard HTTP ď‚— REST better performance and scalability ď‚— SOAP reads cannot be cached
  • 10. When to wash? When to relax? ď‚— SOAP â—¦ WS-Security: enterprise security features â—¦ WS-AtomicTransactions: ACID compliant â—¦ WS-ReliableMessaging: end-to-end reliability â—¦ Ex.: smartphone app that communicates with a bank app on the web, need the previous implementations ď‚— REST â—¦ Lightweight â—¦ Less complex for maintenance â—¦ Bring the “web” back to web services
  • 11. Reference ď‚— http://www.w3schools.com/soap/default.asp ď‚— http://en.wikipedia.org/wiki/Representational_State _Transfer ď‚— http://en.wikipedia.org/wiki/SOAP ď‚— http://www.crummy.com/writing/RESTful-Web- Services/ ď‚— http://tomayko.com/writings/rest-to-my-wife