A General Overview of RESTful Web Services

A General Overview of RESTful Web Services

Eyuphan Ozdemir (Victoria University of Wellington, New Zealand)
DOI: 10.4018/978-1-7998-2142-7.ch006
OnDemand PDF Download:
Available
$37.50
No Current Special Offers
TOTAL SAVINGS: $37.50

Abstract

This chapter aims to present a general overview of today's dominant software architectural style for developing web services, namely REST, by comparing the core elements of this paradigm with the big web service model. The study evaluates the HTTP requests, responses, and thus, the SOAP/JSON payloads involved in consuming a big web service and a RESTful service that is developed in the ASP.NET Core Web API framework. After summarizing the REST constraints, the chapter elucidates how the example RESTful web service satisfies these constraints and lists some scenarios suited to each paradigm. The study notes the object-oriented elements that are inherent in RESTful services, specifically how polymorphism and abstraction principles can be applied to RESTful services.
Chapter Preview
Top

Background

A web service is defined by World Wide Web Consortium (W3C) as follows:

A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards. ( Haas and Brown, 2004)

This definition appears outdated because of its central reference to SOAP (Simple Object Access Protocol) and XML (Extensible Markup Language). Nevertheless, it is useful to distinguish the first SOAP-based examples of web services from previous distributed object technologies. Among these technologies were DCOM (Distributed Component Object Model), CORBA (Common Object Request Broker Architecture) and Java RMI (Java Remote Method Invocation). However, these technologies failed to be efficient in terms of interoperability and security (Halili & Ramadani, 2018).

XML-RPC (XML-Remote Procedure Call) was designed as an alternative to these old technologies and can be seen as the prototype of today’s modern web services in that it uses HTTP to transport the payload, supports request-response pattern, stores the payload in a text format and is interoperable. XML-RPC evolved to SOAP (Winer, 2002) which was almost the only game in the town before the emergence of RESTful services.1 Today, RESTful and SOAP-based web services are the dominant web services, with the former being the most common (Gonzalo & Rakela, 2015; Santos, 2017).2

Key Terms in this Chapter

SOAP (Simple Object Access Protocol): An XML-based envelope or messaging protocol that is used to exchange information between the service requester and the web service.

XML (Extensible Markup Language): A markup language or format that is used to present the data in a hierarchy of elements in accordance with a set of rules.

JSON (JavaScript Object Notation): A data exchange (or message) format that is used by JavaScript to represent the objects.

WSDL (Web Services Description Language): An XML-based language that describes endpoints, bindings, interfaces, operations (web methods) and data types of a web service.

Payload: The actual, intended message which is located in request and response body when the data is transmitted through HTTP.

URI (Uniform Resource Identifier): A string that identifies resources and includes the scheme (network protocol), host and path of the resource and may also include query parameters and a fragment.

Complete Chapter List

Search this Book:
Reset