SlideShare a Scribd company logo
Mobility Information Series
Comparison between various
Web Services Data Transfer Frameworks for
Mobile Enabling Applications
Author: Arun Chandran, Technical Architect, RapidValue Solutions
SOAP
REST
vs
XML
JSON
vs
©RapidValue Solutions
Contents
020202
Introduction
SOAP vs. REST
Performance
Maintenance
Security
Transactions
Messaging
Additional Parameters
XML vs. JSON
Performance
Scenario
Timing
CPU/Memory
Summary
About RapidValue
3
3
4
4
4
4
5
5
6
3
6
6
6
7
8
Introduction
This document is a guide for developers and architects to select an appropriate framework to transfer
data between server and mobile devices. It explains the difference between two popular web services
architecture - SOAP & REST, and compares performance, maintenance, security, transactions,
messaging etc. between the two frameworks. The document also examines the pros and cons of two
commonly used data-interchange formats i.e. XML and JSON.
Ideal Approaches for Mobile Devices
There are two commonly used web services architecture - SOAP and REST. SOAP (Simple Object
Access Protocol) and REST (Representational State Transfer) provide mechanisms for requesting
information from endpoints (SOAP) or from resources (REST). SOAP has a more formal definition
mechanism called WSDL (Web Services Definition Language) and is slightly more complex to
implement than REST. REST uses the standard HTTP request and response mechanism, simplifies
implementation and provides a looser coupling of client and server.
REST has several advantages over SOAP. It is light weight. Therefore, data being passed will be lesser
over the network (since data is passed over a network to a mobile device). This makes a
considerable difference especially when Internet speed is low.
The table below provides a brief comparison between SOAP and REST.
SOAP vs. REST
1
2
3
4
5
6
7
An architectural style protocol
Uses XML or JSON to send and receive data
Simply calls services via URL path
Result is readable which is just plain XML or JSON
Transfer is over HTTP only
Easy to call from JavaScript
Performance is much better compared to SOAP -
less CPU intensive, leaner code etc.
A XML-based message protocol
Uses WSDL for communication between
consumer and provider
Invokes services by calling RPC method
Does not return human readable result
Transfer is over HTTP. Also uses other
protocols such as SMTP, FTP, etc.
JavaScript can call SOAP, but it is difficult to
implement
Performance is not great compared to REST
SOAP# REST
©RapidValue Solutions 020203
This section describes differences between SOAP and REST in more detail:
Performance
– REST is easier to use in JavaScript code as you can simply pass the data packet directly into a
JavaScript array without any parsing, extracting and converting – lesser CPU intensive, since the
CPU’s of mobile/tablets might be of lesser capacity compared to a laptop/desktop.
– If the load of the server is considered, REST has slightly better performance since it accepts
minimal overhead on top of HTTP. Usually SOAP brings with it a stack of different handlers and
parsers. However, the performance difference by itself is not that large, but RESTful service is
easier to scale up since there are no server side sessions.
– If the performance of the network i.e. bandwidth is considered, REST has better performance,
since it is only HTTP and no overhead. Therefore, if the service runs on top of HTTP, it cannot
get much leaner than REST. Furthermore, if you encode your representations in JSON (as
opposed to XML), you will save many more bytes.
– REST reads can be cached, SOAP based reads cannot be cached.
– Building clients, developing APIs, and understanding the technical documentation is easier
with REST than with SOAP.
In general, REST has better performance and scalability.
Maintenance
– SOAP supports SSL and WS-Security which includes enterprise security features. It provides
identity through intermediaries, not just point-to-point (SSL). It also provides standard
implementation of data integrity and data privacy. It supports some security tools that typical
internet services do not require; in fact they are mostly needed in few enterprise scenarios.
Security
– REST is limited to HTTP which cannot provide two-phase commit across distributed
transactional resources, whereas SOAP is capable.
Transactions
©RapidValue Solutions 020204
The table below provides a brief comparison between XML and JSON:
Messaging
– REST does not have a standard messaging system and expects clients to deal with
communication failures by retrying. SOAP has successful/retry logic built-in and provides
end-to-end reliability even through SOAP intermediaries.
– Most mobile SDKs and jQuery support REST
– REST supports synchronous and asynchronous process for mobiles
– REST makes interface utilization easier in the client (device). Therefore, not only your server
becomes leaner but the client too.
Additional Parameters
XML vs. JSON1
There are various formats available to transfer data between client and server. The most commonly
used ones are JSON and XML.
Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding
documents in a format which is both human-readable and machine-readable.
JavaScript Object Notation (JSON) is a text-based open standard designed for human-readable data
interchange. It is derived from the JavaScript scripting language for representing simple data structures
and associative arrays called objects. In spite of its relationship to JavaScript, it is language-
independent with parsers available for many languages. JSON format is often used for serializing and
transmitting structured data over a network connection. It is used primarily to transmit data between a
server and web application. It serves as an alternative to XML.
1
2
3
4
5
6
No Validation
No namespaces
Parsing is just an eval. Therefore it is fast.
In JavaScript, we can work with objects-run time
evaluation of types
A JavaScript object
JSON is light weight compared to XML
XSD Validation
Includes namespaces
Requires parsing. xml doc is parsed through
parameters like xpath etc.
JavaScript work with strings. May require
additional parsing
Write JavaScript to parse the xml objects
Heavy compared to JSON
XML# JSON
©RapidValue Solutions 020205
Performance
Large numbers of objects are used in order to achieve accurate average measurements. The client
sends one million encoded objects to the server for both JSON and XML. The results are as follows:
This section explains the difference between JSON and XML in the form of an experiment. This section
consists of test case results from a case study - research conduced by department of Computer
Science, Montana State University – Bozeman, USA. These test cases are designed and implemented
to compare transmission times and resource utilizations of JSON and XML.The results illustrate the
differences between JSON and XML encoding under varying transmission scenario.
Scenario 2
: A time-consuming transmission of large number of objects.
Number of Objects
Total time to transfer million objects (ms)
Average time (ms)
1 million
4546694.78
4.55
1 million
78257.9
0.08
JSONParameters XML
Timing
JSON 86.13
54.59
13.08
45.41
27.37
29.69XML
Average % System
CPU Utilization
Average % User CPU
Utilization
Format Average % Memory
Utilization
CPU/Memory
Source: 1
Wikipedia definitions
2
Comparison of JSON and XML Data Interchange Formats: A Case Study by Nurzhan Nurseitov, Michael Paulson, Randall Reynolds,
Clemente Izurieta, Montana State University
©RapidValue Solutions 020206
Summary
– If the application requires transferring highly secure data, then the best option will be to use
SOAP.
– If high security is not a concern, then REST would be the ideal choice as REST services is easier
to develop, maintain and performance of the application will be better - consumes lesser CPU
memory, works well at lower bandwidth even during high transactions.
– JSON is recommended over XML for data transmission over the Internet, especially when
interactions with mobile devices are involved since it is light weight data-interchange format.
Based on our experience and usage of various web service frameworks, our recommendations are as
follows:
If you have any questions or need further information, please do write to us.
©RapidValue Solutions 020207
About RapidValue
A global leader in digital transformation for enterprise providing end-to-end mobility,
omni-channel, IoT and cloud solutions. Armed with a large team of experts in
consulting, UX design, application development, integration and testing, along with
experience delivering projects worldwide, in mobility and cloud, we offer a wide range
of services across industry verticals. We deliver services to the world’s top brands,
fortune 1000 companies, Multinational companies and emerging start-ups. We have
www.rapidvaluesolutions.com www.rapidvaluesolutions.com/blog
+1 877.643.1850 contactus@rapidvaluesolutions.com
January 2013
offices in the United States, the United Kingdom and India.

More Related Content

DOCX
Soa interview questions (autosaved)
DOCX
Soa interview questions
PPTX
Web Programming
PPTX
REST and RESTful Web Services
DOCX
Rest vs soap
PDF
Restful web services by Sreeni Inturi
PPTX
componenets of osb12c
PPTX
Representational state transfer (rest) architectural style1.1
Soa interview questions (autosaved)
Soa interview questions
Web Programming
REST and RESTful Web Services
Rest vs soap
Restful web services by Sreeni Inturi
componenets of osb12c
Representational state transfer (rest) architectural style1.1

What's hot (19)

PDF
Esc 209 paper_doin
PDF
Web Service Interaction Models | Torry Harris Whitepaper
PDF
IRJET- A Review on Performance Enhancement of Web Services using Tagged-Sub O...
PPTX
Java servlets
PDF
Representational State Transfer (REST)
PDF
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
PPT
PPT
Web services for developer
PPTX
Optimization Of Soap Presentation(Jg9e10)
KEY
REpresentational State Transfer
PDF
REST vs. SOAP
PDF
Web Services Tutorial
ODP
Web service Introduction
PPTX
Web Services in the Real World
PPTX
Semantic Web Services (Standards, Monitoring, Testing and Security)
PPTX
SOA for PL/SQL Developer (OPP 2010)
PPTX
Web Services - Architecture and SOAP (part 1)
PPTX
TechNet Webcast: Exchange 2010 Outlook Web Access
PDF
Java Web Services [1/5]: Introduction to Web Services
Esc 209 paper_doin
Web Service Interaction Models | Torry Harris Whitepaper
IRJET- A Review on Performance Enhancement of Web Services using Tagged-Sub O...
Java servlets
Representational State Transfer (REST)
Introduction to Service Oriented Architectures, SOAP/WSDL Web Services and RE...
Web services for developer
Optimization Of Soap Presentation(Jg9e10)
REpresentational State Transfer
REST vs. SOAP
Web Services Tutorial
Web service Introduction
Web Services in the Real World
Semantic Web Services (Standards, Monitoring, Testing and Security)
SOA for PL/SQL Developer (OPP 2010)
Web Services - Architecture and SOAP (part 1)
TechNet Webcast: Exchange 2010 Outlook Web Access
Java Web Services [1/5]: Introduction to Web Services
Ad

Similar to Mobility Information Series - Webservice Architecture Comparison by RapidValue (20)

ODT
Rest With Json Vs Soap With Xml
PPTX
Web-Services-web services-20052025-051043pm.pptx
DOCX
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs
PPTX
Phalcon 2 High Performance APIs - DevWeekPOA 2015
DOCX
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
PPTX
Web services for banks
PPT
Bottom-Line Web Services
PDF
A Study Of Web Services And Its Implications
PPTX
REST & SOAP.pptx
PPTX
Soap UI - Getting started
PPTX
Introduction to SoapUI day 1
PDF
PDF
Differentiating between web APIs, SOA, & integration …and why it matters
PPTX
Data exchange over internet (XML vs JSON)
PPTX
Internet protocalls & WCF/DReAM
PDF
Application.pdf
PPTX
InterConnect 2015 session 2825 cics_and_the_new soa
PPT
Intro to web services
PPTX
Data Intechange at Work: XML and JSON
Rest With Json Vs Soap With Xml
Web-Services-web services-20052025-051043pm.pptx
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs
Phalcon 2 High Performance APIs - DevWeekPOA 2015
SOAP vs REST_ Which Web Service Protocol is Right for Your Needs.docx
Web services for banks
Bottom-Line Web Services
A Study Of Web Services And Its Implications
REST & SOAP.pptx
Soap UI - Getting started
Introduction to SoapUI day 1
Differentiating between web APIs, SOA, & integration …and why it matters
Data exchange over internet (XML vs JSON)
Internet protocalls & WCF/DReAM
Application.pdf
InterConnect 2015 session 2825 cics_and_the_new soa
Intro to web services
Data Intechange at Work: XML and JSON
Ad

More from RapidValue (20)

PDF
How to Build a Micro-Application using Single-Spa
PDF
Play with Jenkins Pipeline
PDF
Accessibility Testing using Axe
PDF
Guide to Generate Extent Report in Kotlin
PDF
Automation in Digital Cloud Labs
PDF
Microservices Architecture - Top Trends & Key Business Benefits
PDF
Uploading Data Using Oracle Web ADI
PDF
Appium Automation with Kotlin
PDF
Build UI of the Future with React 360
PDF
Python Google Cloud Function with CORS
PDF
Real-time Automation Result in Slack Channel
PDF
Automation Testing with KATALON Cucumber BDD
PDF
How to Implement Micro Frontend Architecture using Angular Framework
PDF
Video Recording of Selenium Automation Flows
PDF
JMeter JMX Script Creation via BlazeMeter
PDF
Migration to Extent Report 4
PDF
The Definitive Guide to Implementing Shift Left Testing in QA
PDF
Data Seeding via Parameterized API Requests
PDF
Test Case Creation in Katalon Studio
PDF
How to Perform Memory Leak Test Using Valgrind
How to Build a Micro-Application using Single-Spa
Play with Jenkins Pipeline
Accessibility Testing using Axe
Guide to Generate Extent Report in Kotlin
Automation in Digital Cloud Labs
Microservices Architecture - Top Trends & Key Business Benefits
Uploading Data Using Oracle Web ADI
Appium Automation with Kotlin
Build UI of the Future with React 360
Python Google Cloud Function with CORS
Real-time Automation Result in Slack Channel
Automation Testing with KATALON Cucumber BDD
How to Implement Micro Frontend Architecture using Angular Framework
Video Recording of Selenium Automation Flows
JMeter JMX Script Creation via BlazeMeter
Migration to Extent Report 4
The Definitive Guide to Implementing Shift Left Testing in QA
Data Seeding via Parameterized API Requests
Test Case Creation in Katalon Studio
How to Perform Memory Leak Test Using Valgrind

Recently uploaded (20)

PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Online Work Permit System for Fast Permit Processing
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
medical staffing services at VALiNTRY
PPT
Introduction Database Management System for Course Database
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
System and Network Administraation Chapter 3
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Nekopoi APK 2025 free lastest update
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
top salesforce developer skills in 2025.pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Online Work Permit System for Fast Permit Processing
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
medical staffing services at VALiNTRY
Introduction Database Management System for Course Database
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
How to Migrate SBCGlobal Email to Yahoo Easily
System and Network Administraation Chapter 3
CHAPTER 2 - PM Management and IT Context
ISO 45001 Occupational Health and Safety Management System
Softaken Excel to vCard Converter Software.pdf
Understanding Forklifts - TECH EHS Solution
Design an Analysis of Algorithms II-SECS-1021-03
Odoo Companies in India – Driving Business Transformation.pdf
history of c programming in notes for students .pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Nekopoi APK 2025 free lastest update
How Creative Agencies Leverage Project Management Software.pdf
top salesforce developer skills in 2025.pdf

Mobility Information Series - Webservice Architecture Comparison by RapidValue

  • 1. Mobility Information Series Comparison between various Web Services Data Transfer Frameworks for Mobile Enabling Applications Author: Arun Chandran, Technical Architect, RapidValue Solutions SOAP REST vs XML JSON vs
  • 2. ©RapidValue Solutions Contents 020202 Introduction SOAP vs. REST Performance Maintenance Security Transactions Messaging Additional Parameters XML vs. JSON Performance Scenario Timing CPU/Memory Summary About RapidValue 3 3 4 4 4 4 5 5 6 3 6 6 6 7 8
  • 3. Introduction This document is a guide for developers and architects to select an appropriate framework to transfer data between server and mobile devices. It explains the difference between two popular web services architecture - SOAP & REST, and compares performance, maintenance, security, transactions, messaging etc. between the two frameworks. The document also examines the pros and cons of two commonly used data-interchange formats i.e. XML and JSON. Ideal Approaches for Mobile Devices There are two commonly used web services architecture - SOAP and REST. SOAP (Simple Object Access Protocol) and REST (Representational State Transfer) provide mechanisms for requesting information from endpoints (SOAP) or from resources (REST). SOAP has a more formal definition mechanism called WSDL (Web Services Definition Language) and is slightly more complex to implement than REST. REST uses the standard HTTP request and response mechanism, simplifies implementation and provides a looser coupling of client and server. REST has several advantages over SOAP. It is light weight. Therefore, data being passed will be lesser over the network (since data is passed over a network to a mobile device). This makes a considerable difference especially when Internet speed is low. The table below provides a brief comparison between SOAP and REST. SOAP vs. REST 1 2 3 4 5 6 7 An architectural style protocol Uses XML or JSON to send and receive data Simply calls services via URL path Result is readable which is just plain XML or JSON Transfer is over HTTP only Easy to call from JavaScript Performance is much better compared to SOAP - less CPU intensive, leaner code etc. A XML-based message protocol Uses WSDL for communication between consumer and provider Invokes services by calling RPC method Does not return human readable result Transfer is over HTTP. Also uses other protocols such as SMTP, FTP, etc. JavaScript can call SOAP, but it is difficult to implement Performance is not great compared to REST SOAP# REST ©RapidValue Solutions 020203
  • 4. This section describes differences between SOAP and REST in more detail: Performance – REST is easier to use in JavaScript code as you can simply pass the data packet directly into a JavaScript array without any parsing, extracting and converting – lesser CPU intensive, since the CPU’s of mobile/tablets might be of lesser capacity compared to a laptop/desktop. – If the load of the server is considered, REST has slightly better performance since it accepts minimal overhead on top of HTTP. Usually SOAP brings with it a stack of different handlers and parsers. However, the performance difference by itself is not that large, but RESTful service is easier to scale up since there are no server side sessions. – If the performance of the network i.e. bandwidth is considered, REST has better performance, since it is only HTTP and no overhead. Therefore, if the service runs on top of HTTP, it cannot get much leaner than REST. Furthermore, if you encode your representations in JSON (as opposed to XML), you will save many more bytes. – REST reads can be cached, SOAP based reads cannot be cached. – Building clients, developing APIs, and understanding the technical documentation is easier with REST than with SOAP. In general, REST has better performance and scalability. Maintenance – SOAP supports SSL and WS-Security which includes enterprise security features. It provides identity through intermediaries, not just point-to-point (SSL). It also provides standard implementation of data integrity and data privacy. It supports some security tools that typical internet services do not require; in fact they are mostly needed in few enterprise scenarios. Security – REST is limited to HTTP which cannot provide two-phase commit across distributed transactional resources, whereas SOAP is capable. Transactions ©RapidValue Solutions 020204
  • 5. The table below provides a brief comparison between XML and JSON: Messaging – REST does not have a standard messaging system and expects clients to deal with communication failures by retrying. SOAP has successful/retry logic built-in and provides end-to-end reliability even through SOAP intermediaries. – Most mobile SDKs and jQuery support REST – REST supports synchronous and asynchronous process for mobiles – REST makes interface utilization easier in the client (device). Therefore, not only your server becomes leaner but the client too. Additional Parameters XML vs. JSON1 There are various formats available to transfer data between client and server. The most commonly used ones are JSON and XML. Extensible Markup Language (XML) is a markup language that defines a set of rules for encoding documents in a format which is both human-readable and machine-readable. JavaScript Object Notation (JSON) is a text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays called objects. In spite of its relationship to JavaScript, it is language- independent with parsers available for many languages. JSON format is often used for serializing and transmitting structured data over a network connection. It is used primarily to transmit data between a server and web application. It serves as an alternative to XML. 1 2 3 4 5 6 No Validation No namespaces Parsing is just an eval. Therefore it is fast. In JavaScript, we can work with objects-run time evaluation of types A JavaScript object JSON is light weight compared to XML XSD Validation Includes namespaces Requires parsing. xml doc is parsed through parameters like xpath etc. JavaScript work with strings. May require additional parsing Write JavaScript to parse the xml objects Heavy compared to JSON XML# JSON ©RapidValue Solutions 020205
  • 6. Performance Large numbers of objects are used in order to achieve accurate average measurements. The client sends one million encoded objects to the server for both JSON and XML. The results are as follows: This section explains the difference between JSON and XML in the form of an experiment. This section consists of test case results from a case study - research conduced by department of Computer Science, Montana State University – Bozeman, USA. These test cases are designed and implemented to compare transmission times and resource utilizations of JSON and XML.The results illustrate the differences between JSON and XML encoding under varying transmission scenario. Scenario 2 : A time-consuming transmission of large number of objects. Number of Objects Total time to transfer million objects (ms) Average time (ms) 1 million 4546694.78 4.55 1 million 78257.9 0.08 JSONParameters XML Timing JSON 86.13 54.59 13.08 45.41 27.37 29.69XML Average % System CPU Utilization Average % User CPU Utilization Format Average % Memory Utilization CPU/Memory Source: 1 Wikipedia definitions 2 Comparison of JSON and XML Data Interchange Formats: A Case Study by Nurzhan Nurseitov, Michael Paulson, Randall Reynolds, Clemente Izurieta, Montana State University ©RapidValue Solutions 020206
  • 7. Summary – If the application requires transferring highly secure data, then the best option will be to use SOAP. – If high security is not a concern, then REST would be the ideal choice as REST services is easier to develop, maintain and performance of the application will be better - consumes lesser CPU memory, works well at lower bandwidth even during high transactions. – JSON is recommended over XML for data transmission over the Internet, especially when interactions with mobile devices are involved since it is light weight data-interchange format. Based on our experience and usage of various web service frameworks, our recommendations are as follows: If you have any questions or need further information, please do write to us. ©RapidValue Solutions 020207
  • 8. About RapidValue A global leader in digital transformation for enterprise providing end-to-end mobility, omni-channel, IoT and cloud solutions. Armed with a large team of experts in consulting, UX design, application development, integration and testing, along with experience delivering projects worldwide, in mobility and cloud, we offer a wide range of services across industry verticals. We deliver services to the world’s top brands, fortune 1000 companies, Multinational companies and emerging start-ups. We have www.rapidvaluesolutions.com www.rapidvaluesolutions.com/blog +1 877.643.1850 contactus@rapidvaluesolutions.com January 2013 offices in the United States, the United Kingdom and India.