Webservices

From HaFrWiki
Revision as of 12:24, 7 December 2014 by Hjmf (talk | contribs) (SOAP vs REST)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Webservices are Web Application Components, which can be published, found and used on the Web. Webservices are:

  • Application components
  • Using open protocols
  • Self-contained and self-descibed
  • Discovered usibf UDDI
  • Used by other applications
  • HTTP and XML are the basis for Web Services

Webservices are related to:

  • WSDL, XML language for describing Web Services
  • SOAP, XML based protocol for accessing Web services.
  • UDDI, Directory service where you can search Web services.
  • RDF, Framework for describing resources on the web

WSDL

Web Services Description Language (WSDL) is an XML-based interface definition 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.

While WSDL is flexible in service binding options (for example, services can be offered via SMTP mail servers), it did not originally support HTTP operations other than GET and POST. Since REST services often use other HTTP verbs, such as PUT and DELETE, WSDL was a poor choice for documenting REST services.

The second alternative is WADL, the Web Application Description Language. WADL is championed by Sun Microsystems. Like the rest of REST, WADL is lightweight, easier to understand and easier to write than WSDL. In some respects, it is not as flexible as WSDL (no binding to SMTP servers), but it is sufficient for any REST service and much less verbose.

SOAP

Simple Objects Access Protocol (SOAP) is a protocol specification for exchanging structured information in the implementation of web services in computer networks. It uses XML Information Set for its message format, and relies on other application layer protocols, most notably Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.

Who uses

Google seams to be consistent in implementing their web services to use SOAP, with the exception of Blogger, which uses XML-RPC. You will find SOAP web services in lots of enterprise software as well.

UDDI

Universal Description Discovery and Integration (UDDI) is a platform-independent, Extensible Markup Language (XML)-based registry by which businesses worldwide can list themselves on the Internet, and a mechanism to register and locate web service applications. UDDI is an open industry initiative, sponsored by the Organization for the Advancement of Structured Information Standards (OASIS), for enabling businesses to publish service listings and discover each other, and to define how the services or software applications interact over the Internet.

UDDI was originally proposed as a core Web service standard. It is designed to be interrogated by SOAP messages and to provide access to Web Services Description Language (WSDL) documents describing the protocol bindings and message formats required to interact with the web services listed in its directory.

RDF

Resource Description Framework (RDF is a family of World Wide Web Consortium (W3C) specifications originally designed as a metadata data model. It has come to be used as a general method for conceptual description or modeling of information that is implemented in web resources, using a variety of syntax notations and data serialization formats. It is also used in knowledge management applications.

REST

The acronym REST stands for Representational State Transfer, this basically means that each unique URL is a representation of some object. You can get the contents of that object using an HTTP GET, to delete it, you then might use a POST, PUT, or DELETE to modify the object (in practice most of the services use a POST for this).
More...

SOAP vs REST

Main advantages of REST web services are: [1]

  • Lightweight - not a lot of extra xml markup
  • Human Readable Results
  • Easy to build - no toolkits required

Main advantages of SOAP:

  • Easy to consume - sometimes
  • Rigid - type checking, adheres to a contract
  • Development tools

See also

top

  • CORBA, Common Object Request Broker Architecture
  • REST, Representational State Transfer. A (new) approach to system architecture and a lightweight alternative to web services.
  • RMI, Remote Method Invocation (Java)
  • RPC, Remote Procedure Calls

Reference

top

  1. Pete Freitag, SOAP vs REST