back to the basics with..

Web Services




..special thanks to Wikipedia

A brief history


  • The HTTP/1.1 standard as defined in RFC 2068 was officially released in January 1997. Improvements and updates to the HTTP/1.1 standard were released under RFC 2616 in June 1999.
  • The REST architectural style was developed by W3C Technical Architecture Group (TAG) in parallel with HTTP 1.1, based on the existing design of HTTP 1.0.

A brief history... continued



SOAP 

(Simple Object Access Protocol)


SOAP was designed as an object-access protocol in 1998 by Dave WinerDon Box, Bob Atkinson, and Mohsen Al-Ghosein for Microsoft, where Atkinson and Al-Ghosein were working at the time. The SOAP specification is currently maintained by the XML Protocol Working Group of the World Wide Web Consortium.

SOAP originally stood for "Simple Object Access Protocol" but this acronym was dropped with version 1.2 of the standard.Version 1.2 became a W3Crecommendation on June 24, 2003.


the WSDL


The Web Services Description Language (WSDL) is an XML-based interface description language that is used for describing the functionality offered by a web service. The acronym is also used for any specific WSDL description of a web service (also referred to as a WSDL file), which provides a machine-readable description of how the service can be called, what parameters it expects, and what data structures it returns. It thus serves a purpose that corresponds roughly to that of a method signature in a programming language.

SOAP is dependent on XML

...Lets take a look

REST

(Representational state transfer )

Representational state transfer (REST) is a software architectural style consisting of a coordinated set of architectural constraints applied to components, connectors, and data elements, within a distributed hypermedia system. REST ignores the details of component implementation and protocol syntax in order to focus on the roles of components, the constraints upon their interaction with other components, and their interpretation of significant data elements.

The term representational state transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation at UC Irvine.REST has been applied to describe desired web architecture, to identify existing problems, to compare alternative solutions, and to ensure that protocol extensions would not violate the core constraints that make the web successful. Fielding used REST to design HTTP 1.1 and Uniform Resource Identifiers (URI). The REST architectural style is also applied to the development of web services as an alternative to other distributed-computing specifications such as SOAP.


REST is just HTTP

(you already know it!)




Let's look at some examples...

RESTfully fancy 

with URL parameters, HTTP methods


GET: http://example.com/resources/item17

{item17} = variable


PUT: http://example.com/resources/item17

DELETE: http://example.com/resources/item17


PUT & DELETE = Idempotent 

(multiple identical requests should have the same effect as a single request)

Think of it like folders!


GET: http://example.com/resources/item17
can be thought of like: 
item17 is just one of many in the folder resources

               example.com folder
                          |_
                             resources
                            |_
                               item1
                               item2
                               ...
                               item17

What does REST return?


  • Since REST is just HTTP, it can return anything, 
    • but the most common are..
      • XML
      • JSON
      • text/plain

State


HTTP is stateless, meaning that it.. 
treats each request as an independent transaction that is unrelated to any previous request so that the communication consists of independent pairs of request and response

SOAP and REST are both built upon HTTP, 
so each are inherently stateless. 


This basically says that you need to 
authenticate with each request

Authentication Methods


  • Basic Auth
    • Common among both SOAP and REST
  • OAuth
  • NTLM
  • Anything that HTTP can do


...but let's not get into it

Back to the basics with Web Services

By Tom Esposito

Back to the basics with Web Services

  • 997