Comparison of SOAP and REST Based Web Services Using Software Evaluation Metrics
Comparison of SOAP and REST Based Web Services Using Software Evaluation Metrics
Abstract – The usage of Web services has recently increased. II. THEORETICAL BASIS
Therefore, it is important to select right type of Web services at the
project design stage. The most common implementations are This section addresses the key concepts that will be used in
based on SOAP (Simple Object Access Protocol) and REST the paper.
(Representational State Transfer Protocol) styles. Maintainability
A. Web Services
of REST and SOAP Web services has become an important issue
as popularity of Web services is increasing. Choice of the right A single Web service consists of service and service
approach is not an easy decision since it is influenced by description where service is a software module offered by a
development requirements and maintenance considerations. service provider, which is available through the Web. A service
In the present research, we present the comparison of SOAP and description contains the details of the service interface and
REST based Web services using software evaluation metrics.
To achieve this aim, a systematic literature review will be made to
implementations, including data types, metadata, categorisation
compare REST and SOAP Web services in terms of the software information and the location where the service is exposed [3],
evaluation metrics. [1]. Service description is published in the service registry,
where services are displayed and grouped by their purpose.
Keywords – Literature review, REST, SOAP, Web services. A web service is the key element in the integration of different
information systems, as information systems can be based on
I. INTRODUCTION different platforms, programming languages and technologies.
A. Problem Formulation B. SOAP
Nowadays the most common way to exchange data among SOAP compared to REST is an older protocol, which was
information systems is to use Web services. Web services are developed as an alternative to CORBA (Common Object
self-contained, modular and dynamic applications by their Request Broker Architecture) standard. To ensure data
nature [1]. Most common implementations are based on SOAP transport in SOAP, protocols such as HTTP, SMTP, etc., are
(Simple Object Access Protocol) and REST (Representational used, while the data are sent in XML format [3]. The main
State Transfer Protocol) styles. Each of these approaches has its principle of this approach is as follows: a service provider
own advantages and disadvantages, so it is important to choose publishes a service description or interface to the service
the right type of Web services, otherwise it can lead to certain registry, so the service requester can find a right service
problems in data exchange or impose some restrictions. This instance and use it [7].
paper compares SOAP and REST approaches to give The amount of data sent by SOAP can cause some
recommendations on how to opt the right Web service type at a performance problems because when forming the message
project design phase. SOAP adds an additional header and body parts to the message.
There are a number of related studies on these protocols, SOAP-based Web services include a variety of standards, such
primary benefits and final value [2], [3], [4]. Other articles as WSDL, WSBPEL, WS-Security, WS-Addressing
review real implementation examples [5], [6]. This research (responsible for the Web service and message addressing) [8].
paper summarises these studies and gives a comparison, which These standards were developed by standardisation
helps identify the key differences and benefits of SOAP and organisations, such as W3C and OASIS.
REST protocols. C. REST
B. Aim and Tasks REST is a newer approach, which uses the HTTP protocol to
The aim of the paper is to summarise the main SOAP and transmit data, while the data are formed by XML, JSON, etc.
REST protocol advantages and disadvantages. formats [3]. It simplifies access to Web services by using the
To achieve this aim, the following tasks are set: existing and well-known standards instead of adding a new data
(1) to define the metrics by which it is possible to mutually processing layers on the transmission and communication stack
compare SOAP and REST protocols; [9]. Thus, REST tends to be a lighter alternative to the heavy
(2) to compare SOAP and REST by found metrics; SOAP protocol. REST Web services are based on self-defining
(3) to evaluate which protocol type is better on the basis of resources where the HTTP protocol is used to reach them.
software evaluation metrics. A service is provided as a resource that can be identified by URI
(Uniform Resource Identifier) [8]. For example, if URI
http://www.example.com/rest/user/1 is opened in the Web
browser, the Web service will return information about a user The resulting search string is shown in (2):
whose ID is “1”. In order to perform data operations with the (SOAP OR “Simple Object Access Protocol” OR
service, standard HTTP methods, such as GET, PUT, POST, “SOAP Web services” OR “SOAP Web service”)
DELETE, etc., are used [10]. AND
(REST OR “Representational state transfer” OR (2)
D. Software Evaluation Metrics
RESTFUL OR “RESTFUL WEB SERVICES” OR
There are two types of metrics, which are used in terms of
“RESTFUL WEB SERVICE”)
software development [2]: direct, measurable metrics (errors,
cost, etc.) and indirect or non-measurable metrics (complexity,
maintainability, etc.). The most popular evaluation metrics are The search string has been executed in the digital library
summarised in Table I. services to titles, abstracts and metadata. In order to minimise
the found data sets, we have defined the criteria that the article
TABLE I
must be in the field of computer science or IT, as well as the
CATEGORIES OF THE METRICS [2]
article must be written after 2010, as the earlier publications
Direct Indirect may contain information that is no longer up to date. Number
Cost Functionality of the found information sources is displayed in Table III.
Effort Quality TABLE III
Lines of code Complexity OVERVIEW OF INFORMATION SOURCES
Execution speed Efficiency The number of information
No. Source Format
Memory Reliability sources
(S1 OR S2 ... OR Sn) AND (R1 OR R2 ... OR Rn), (1) I2. A study is focused on comparing SOAP
with REST or one of these protocols is
reviewed E2. It is not a scientific
where S covers SOAP keywords and R covers REST keywords. publication (e.g., book
Motivation: The main focus of this research chapter)
TABLE II is to compare SOAP with REST. There is no
particular need to look at other protocols.
SEARCH KEYWORDS AND SYNONYMS
E3. A study that is
SOAP REST related to other
Representational state protocol types than
Simple Object Access Protocol SOAP or REST
transfer
SOAP Web services RESTful
SOAP Web service RESTful Web services
RESTful Web service
Unauthenticated 93
Download Date | 1/20/17 4:47 PM
Information Technology and Management Science
_______________________________________________________________________________________________ 2016/19
Unauthenticated 94
Download Date | 1/20/17 4:47 PM
Information Technology and Management Science
_______________________________________________________________________________________________ 2016/19
In [7] an experiment was made to measure time when 100 performance, security, accessibility, transaction (atomicity,
and 1000 character messages were sent using REST and SOAP. consistency, isolation, and durability), capacity, integrity,
REST showed better performance in this experiment: response regulatory (conformance and compliance to the rules, laws,
time of 100 character message (2.56 s ± 0.10 s) and standards and specifications) and reputation.
1000 character message (3.45 s ± 0.10 s) was significantly Since many of these qualities have been defined in this study
lower compared to SOAP time, when 100 character (5.64 s ± as a comparison metrics, this point is not viewed in detail.
0.17 s) and 1000 character (5.83 s ± 0.17 s) messages were sent.
I. Complexity
This can be explained by the fact that it is not necessary to build
an XML (so the time reduces), which is required for data From the point of view of complexity, it is easier to develop
transmission in the case of SOAP. Consequently, it can be and implement Web services using REST. REST protocol uses
concluded that REST has a faster execution speed than SOAP. the Web architectural style that is closely related to the HTTP
protocol. Thus, the Web service development using REST is
E. Memory more “Web-friendly” [10].
Creating a SOAP request message from a mobile device, ten At the same time, SOAP is based on closely specified data
times longer processing time is consumed in comparison with structures, API (Application Programming Interface), which is
the REST service [5], [6]. Thereby up to 8 times more memory specified in WSDL files [10], and the range of standards, such
resources are consumed. This can be explained by the fact that as WSDL, WSBPEL, etc. [8]. In REST, this all has been
mobile devices are resource limited, which means that more achieved by simplifying the API to the HTTP basic operations,
time to process a message is needed compared to the standard such as GET, PUT, POST, etc. [10], [14].
PCs. In addition, it is mentioned that REST has an advantage XML Schema is an effective language to define the data
over SOAP when bandwidth and resources are limited [7]. model, but sometimes when developing the Web service it is
difficult to identify the right construct to express a data model
F. Errors
that later will be used in SOAP / WSDL implementations [4].
It is possible to import a SOAP WSDL file when using IDE From the point of view of complexity, REST approach is
tools, so the client-side code can be automatically generated by simpler since it uses widely known W3C / IETF standards
the tools. This helps reduce the number of errors that could be (HTTP, XML, URI, and MIME).
tainted if the code were written by a programmer manually. In the case of REST, HTTP clients and servers are available
However, it is possible to describe REST Web service using for all major programming languages and operating systems, as
WADL definition. WADL is the REST equivalent of SOAP’s well as HTTP port 80 is generally open in most firewall
WSDL. In the study [2], which is about SOAP and REST configurations.
service comparison, it is mentioned that the automatic code
generation using the WSDL file helped students from the J. Efficiency
University of Sao Paulo reduce the number of errors and made The REST protocol has caching, clustering and load
source code maintenance easier. In addition, SOAP has built-in balancing mechanisms [4]. This ensures that the REST Web
error handling mechanism [7] that is an advantage over REST. service can be used by a large number of users at the same time.
It should be considered that REST uses JSON (which is a
G. Functionality
lightweight data format) or even plain text to send messages that
One of the advantages of SOAP is that the same SOAP in total reduces the server load.
message in the same format can be sent through several
middleware systems, which may be based on HTTP or any K. Reliability
other protocol [4]. There can be cases where the transport In the SOAP protocol, the WS-Security is used as one of the
protocol may change along middleware systems – it is not a standards [3] for signing and encrypting messages so that the
nuisance to deliver SOAP messages from point A to B. As data transfer becomes safer. In turn, the REST approach is
another advantage of SOAP, it can be mentioned that it supports missing its own security model. Communication model is based
asynchronous requests, which in turn is not possible when using on the HTTP (or HTTPS) built-in security mechanisms, and
REST [7]. additional security mechanisms can be written manually
Nowadays the widely used system integration approaches are depending on the project specifics. Transport layer security
point-to-point and distributed computing. By these two mechanisms protect the point-to-point communication
approaches, the differences between REST and SOAP are channels, but if there are mobile devices involved, it becomes
marked – REST is not applicable in the distributed computing problematic because TLS (Transport Layer Security) channel
environments and is suitable for point-to-point integrations, must be frequently reset [9].
while SOAP is suitable for use in the distributed computing
L. Maintainability
environments, where the message can be sent through one or
more intermediaries [7], [12]. In [2] SOAP and REST are compared in terms of
maintainability perspective. It was concluded that from the
H. Quality maintainability point of view it was easier to maintain RESTful
The main Web service quality characteristics [13] are: Web services on the server side. In turn, SOAP-WSDL Web
service time, reliability, execution price, availability, services were more maintainable on the client-side. This is
Unauthenticated 95
Download Date | 1/20/17 4:47 PM
Information Technology and Management Science
_______________________________________________________________________________________________ 2016/19
explained by the fact that the SOAP Web services use WSDL implementation complexity, execution speed, consumed
file to describe a service interface. In today’s integrated memory resources and performance were better compared to
development tools, such as Eclipse, a client-side code can be SOAP protocol. Thus, if the project requires a simple point-to-
automatically generated based on the available WSDL file. point integration or large-scale availability from the mobile
devices, REST is the right choice. Based on these reasons, the
M. Comparison Summary
major Web service providers use exactly REST: Twitter,
Taking into account the previously viewed metrics relating Yahoo, Flickr, del.icio.us, etc. [7].
to the SOAP and REST service types, the results are presented
in Table V. Summarising the results, it is not possible to clearly B. SOAP
identify the best protocol to use to integrate internal information SOAP is a better choice when the project requires security
systems and applications with other systems. This means that and reliability, easier maintainability on the client side, as well
each project has to be assessed individually by functional and as a lower number of possible errors. In addition, many business
non-functional requirements. Taking into account these system integration projects require asynchronous data
requirements, it is possible to identify which of the processing requests, which are the SOAP advantage.
approaches – SOAP or REST – to use. Consequently, the conclusion is that SOAP is more suitable in
TABLE V large information system integration, such as banking
COMPARISON SUMMARY information system integration projects.
The choice of SOAP and REST approach, depending on the
Metric SOAP REST
project aims, is summarised in Table V. It should be noted that
Cost (lower) ✓ this is not a strict rule how projects should choose the right data
Effort (lower) exchange approach. Table V contains selection criteria based
Server side ✓
on the literature analysis.
Client side ✓ TABLE V
SELECTION OF SOAP AND REST PROTOCOLS
Lines of code
✓
(fewer) Main criteria Project example
Execution ✓ Greater scalability;
speed (faster)
Compatibility;
Memory (low ✓ Mobile app integration with the
Performance;
information systems;
REST
consumption)
Simplicity;
Errors (less) ✓ Simple client-server data
Point-to-point communication exchange solutions.
Functionality model;
Protocol Limited bandwidth.
✓
independent Higher security and
Complexity ✓ reliability;
(lower) Business information systems
Lower number of errors;
(B2B);
SOAP
Maintainability
VI. CONCLUSION
Server side ✓
Client side
This paper provides a general comparison of SOAP and
✓
REST services based on software evaluation metrics. The paper
contains a systematic literature review, where a conceptual
V. RECOMMENDATIONS
comparison method is applied to compare the SOAP and REST
Having performed the research result analysis, it has been approaches. Results do not clearly show which of the
concluded that that it is not possible to clearly identify the best approaches should be selected to make integration among the
approach to ensure data exchange because each integration systems. To select the right approach, functional and non-
project should be assessed individually. Each type – SOAP or functional requirements should be analysed before making the
REST – has its own advantages and disadvantages. However, it choice about SOAP or REST. For example, if the project is
is possible to highlight the main characteristics to ease the about to integrate two simple information systems, the right
choice of the right approach. choice will be REST. However, if the systems are complex and
A. REST they should have additional security levels, the right choice will
be SOAP, which supports many different standards (for
If the project requires greater scalability, compatibility and example WS-Security).
performance, it is better to choose REST. REST
Unauthenticated 96
Download Date | 1/20/17 4:47 PM
Information Technology and Management Science
_______________________________________________________________________________________________ 2016/19
The present paper only focuses on SOAP and REST service [9] G. Serme, A. S. de Oliveira, J. Massiera and Y. Roudier, “Enabling
Message Security for RESTful Services,” in 2012 IEEE 19th
types. In future, the research focus can be made on other Web International Conference on Web Services, Honolulu, HI, 2012, pp. 114–
service types because it was not possible to find detailed 121. https://doi.org/10.1109/icws.2012.94
information on some software evaluation metrics, so this is left [10] T. Aihkisalo and T. Paaso, “Latencies of Service Invocation and
Processing of the REST and SOAP Web Service Interfaces,” in 2012
for future research. IEEE 8th World Congress on Services, Honolulu, HI, 2012, pp. 100–107.
https://doi.org/10.1109/SERVICES.2012.55
REFERENCES [11] J. Kangasharju, S. Tarkoma and K. Raatikainen, “Comparing SOAP
performance for various encodings, protocols, and connections,” in
[1] S. Kumari and S. K. Rath, “Performance comparison of SOAP and REST
Personal Wireless Communications (Lecture Notes in Computer Science
based Web Services for Enterprise Application Integration,” in
(LNCS)). Springer-Verlag, vol. 2775, 2003, pp. 397–406.
International Conference on Advances in Computing, Communications
https://doi.org/10.1007/978-3-540-39867-7_38
and Informatics (ICACCI), Kochi, 2015, pp. 1656–1660.
[12] K. Wagh and R. Thool, “A Comparative Study of SOAP Vs REST Web
https://doi.org/10.1109/ICACCI.2015.7275851
Services Provisioning Techniques for Mobile Host,” Journal of
[2] R. R. de Oliveira, R. V. Vieira Sanchez, J. C. Estrella, R. Pontin de Mattos
Information Engineering and Applications, vol. 2, no. 5, pp. 12–16, 2012,
Fortes and V. Brusamolin, “Comparative Evaluation of the
ISSN 2224-5782 (print), ISSN 2225-0506 (online).
Maintainability of RESTful and SOAP-WSDL Web Services,” in 2013
[13] W. N. Wan Ab Rahman and F. Meziane, “Challenges to Describe QoS
IEEE 7th International Symposium on the Maintenance and Evolution of
Requirements for Web Services Quality Prediction to Support Web
Service-Oriented and Cloud-Based Systems (MESOCA), Eindhoven,
Services Interoperability in Electronic Commerce,” Communications of
2013, pp. 40–49. https://doi.org/10.1109/MESOCA.2013.6632733
the IBIMA, vol. 4, issue 6, pp. 55–58, 2008.
[3] N. Serrano, J. Hernantes and G. Gallardo, “Service-Oriented Architecture
[14] D. Guinard, V. Trifa, S. Karnouskos, P. Spiess and D. Savio, “Interacting
and Legacy Systems,” IEEE Software, 2014.
with the SOA-Based Internet of Things: Discovery, Query, Selection, and
[4] C. Pautasso, O. Zimmermann and F. Leymann, “RESTful Web Services
On-Demand Provisioning of Web Services,” IEEE Transactions on
vs. “Big” Web Services: Making the Right Architectural Decision,” in
Services Computing, vol. 3, no. 3, pp. 223–235, July–Sept. 2010.
Proceedings of the 17th international conference on World Wide Web,
https://doi.org/10.1109/TSC.2010.3
Beijing, China, 2008, pp. 805–814.
https://doi.org/10.1145/1367497.1367606
Juris Tihomirovs is a student at the professional Master programme “IT Project
[5] F. Belqasmi, J. Singh, S. Y. B. Melhem and R. H. Glitho, “SOAP-Based
Management” at the Institute of Information Technology of Riga Technical
Web Services vs. RESTful Web Services for Multimedia Conferencing
University (Latvia). He also works as a Systems Analyst at ZZ Dats Ltd.
Applications: A Case Study,” IEEE Internet Computing, vol. 16, issue 4,
E-mail: [email protected]
pp. 54–63, July–Aug. 2012. https://doi.org/10.1109/MIC.2012.62
[6] F. AlShahwan and K. Moessner, “Providing SOAP Web Services and
Jānis Grabis holds a Doctoral Degree and is a Professor at Riga Technical
RESTful Web Services from Mobile Hosts,” in 2010 5th International
University (Latvia) and the Head of the Institute of Information Technology. His
Conference on Internet and Web Applications and Services (ICIW),
main research interests lie within the application of mathematical programming
Barcelona, 2010, pp. 174–179. https://doi.org/10.1109/ICIW.2010.33
methods in information technology, enterprise applications and system
[7] P. A. Castillo, J. L. Bernier, M. G. Arenas, J. J. Merelo, P. Garcias-
integration. He has published more than 80 scientific papers, including a
Sanchez, “SOAP vs REST: Comparing a master-slave GA
monograph on supply chain configuration. He has led a number of international
implementation,” in The 1st International Workshop of Distributed
and national projects and has participated in five projects in collaboration with
Evolutionary computation in Informal Environments, 2011.
the University of Michigan-Dearborn (USA) and funded mainly by industrial
[8] P. K. Potti, S. Ahuja, K. Umapathy, Z. Prodanoff, “Comparing
partners, such as SAP America and Ford Motor Company.
Performance of Web Service Interaction Styles: SOAP vs. REST,” in
E-mail: [email protected]
Proceedings of the Conference on Information Systems Applied Research,
New Orleans Louisiana, 2012, ISSN 2167-1508.
Unauthenticated 97
Download Date | 1/20/17 4:47 PM