REST
Representational State Transfer
- Architectural style for distributed hypermedia system
- HTTP standard (convention for building HTTP services)
- URL = end point + parameters
Characteristics
- Variety of data formats
- Low bandwidth
- Easy to understand HTTP
SOAP
Simple Object Access Protocol
Characteristics
- ws security (web service security)
- exclusive to SOAP
- quality of protection through message integrity, confidentiality, and single message authentication
- built-in retry logic (REST needs manual client retry)
- has built-in ACID compliance
- function driven WSDL (web service description language)
- shows methods and params to client which allows automation
- SOAP can't cache connection limit like REST
WSDL
Web Service Description Language
What it does
- WSDL allows for automation of client requests
What is it
- WSDL is used to describe web services and it is written in XML
- It specifies the location of the service, and the methods of the service
- Following elements are used to describe:
<type>
defines the (XML schema) data types used by the web service
<message>
defines the data elements for each operation
<portType>
describes the operations that can be performed and the messages involved
<binding>
defines the protocol and data format for each port type
Header Definitions
When making request, you need to specify in the header what type of content you are fetching for
Content-Type: application/json; charset=utf-8
Content-Type:: application/soap+xml; charset=utf-8