DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • API Development - Glossaries
  • Why Is REST API Architecture Gaining Popularity in the Digital Industry?
  • WSDL vs REST/JSON — The Troll Fight
  • The Evolution of Systems Integration

Trending

  • What Is Kubernetes RBAC and Why Do You Need It?
  • Top 7 Best Practices DevSecOps Team Must Implement in the CI/CD Process
  • Auto-Scaling DynamoDB Streams Applications on Kubernetes
  • Modular Software Architecture: Advantages and Disadvantages of Using Monolith, Microservices and Modular Monolith
  1. DZone
  2. Software Design and Architecture
  3. Integration
  4. The Basics of Using REST vs. SOAP

The Basics of Using REST vs. SOAP

The advantages, disadvantages, and use cases between the two ways of creating web services.

Jayashree Kulkarni user avatar by
Jayashree Kulkarni
·
Apr. 03, 16 · Opinion
Like (42)
Save
Tweet
Share
15.53K Views

Join the DZone community and get the full member experience.

Join For Free

As a developer we might have worked with REST as well as SOAP based services. However, when it comes to decide which one to use, many developers are not very clear on the answer. Let’s look at what the differences are in these two ways of creating web services. Before we dig down into the differences here is a short history about REST and SOAP.

REST: REST (REpresentational State Transfer) was introduced and defined in 2000 by Roy Thomas Fielding in his PhD dissertation “Architectural Styles and the Design of Network-based Software Architectures”. Rest facilitates the philosophy of the open web.

SOAP: SOAP (Simple Object Access Protocol) was introduced in 1998 by Dave Winer in collaboration with Microsoft. SOAP is mainly used to address the goals of the enterprise market.

Basic Concepts

RESTSOAP
Makes data available as a resources. E.g. AccountInformation, InvoiceMakes application logic available as a servies. E.g. getAccountInformation, PayInvoice
It’s an architectural style. No strict contract between client and server.It’s a protocol.

Advantages

RESTSOAP
It uses standard HTTP. Easy to implement.Works on top of any communication protocol.
Returns data in many different formats (JSON, XML, etc.)It can be fully described using WSDL.
Better performance and scalability. Reads can be cached.Provides end-to-end reliability and successful/retry logic is built in.
REST allows better support for browser clients due to its support for JSON.Security and authorization are part of the protocol.

Disadvantages

RESTSOAP
Only works on top of HTTP protocol.Hard to implement and not so popular among web and mobile developers.
No built-in standards for security or reliability.Permits XML data format only.
No constraints on the payload.SOAP defines standards to be strictly followed.
    

Requires more bandwidth and resource than REST.

When to Use What

RESTSOAP
When your bandwidth is very limited.When performing transactions that involve multiple calls.
When client and server operates on a web environment.When you want to enforce a strict contract between client and server
Examples: Social Media Service, Web chat serviceExamples: Financial services, telecommunication services

 In nutshell, identify your project need and goal you want to achieve before you pick any of the approaches.

SOAP REST Web Protocols

Opinions expressed by DZone contributors are their own.

Related

  • API Development - Glossaries
  • Why Is REST API Architecture Gaining Popularity in the Digital Industry?
  • WSDL vs REST/JSON — The Troll Fight
  • The Evolution of Systems Integration

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: