Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Representational State Transfer, from now on called REST, is actually not really a protocol, but more of merely a style of communication. Great advantages of having no protocol are simplicity, visibility and performance. A disadvantage is that the communication is not strictly defined, and therefore needs to be documented in a sufficient way. There is an attempt to standardize this communication, called Web Application Description Language (WADL), but it is not widely adopted.

Calling a REST service

Calling a REST service is done by URL. This means that all the information that the server needs, to process your request, is part of the URL (This this is not entirely true due to HTTP headers, but close enough). Here is an example of a REST web service that allows you to receive live information on American airports:

httphttps://servicessoa.smext.faa.gov/asws/api/airport/status/IAD?format=xmlxlm

Go ahead, click on it to see what the current conditions at Washington Dulles Airport are. Your answer may look something like this:

...

This answer is in XML format. The corresponding XSD (explained in Chapter 2 - . Simple Object Access Protocol (SOAP)) is hopefully placed in the documentation of the web service. If not, you will have to generate your own XSD on this answer and hope that it is correct. This is the largest drawback of REST services.

Now, lets look again at the URL:http

Code Block
https://

...

soa.smext.faa.gov/asws/api/airport/status/IAD?format=xml

The URL . It consists of several elements:

 

...


Panel
Section
Column
width50%

 Previous2.

...

Simple Object Access Protocol (SOAP)

Column

Next

...

:

...

 4

...

. Calling a SOAP service

...

 

...