Wednesday, February 18, 2009

What is Web Services?

Definition

There are two ways the term Web services can be used. One refers to standards-based software accessible over the Web. That is the definition  used by Amazon and others who offer Web services online to businesses for a fee.  These Web services often rely on HTTP and are referred to as RESTful Web services. RESTful Web services do not use XML or SOAP.

 

But Web services can also be used in a slightly different way, and it is this definition that is most common when you talk about using Web services in enterprises to support, for instance, a service-oriented  architecture. In this case, the W3C's definition might be more helpful: “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.”

 

Business applications

There are a number of business uses for Web services. One of  the most obvious business uses is the ability to subscribe to Web services online or even offer your own Web services to clients or business partners via the Internet. Web services can be combined to provide new software and  services, as well.

 

Web services can also be used for application integration, linking applications, according to WiseGeek.com. Since Web services can use HTTP and so work through the  firewall, which means you don't have to deal with special security protocols. It should be noted, however, that Web services can also use File Transfer Protocol (FTP), and Simple Mail Transfer Protocol (SMTP) and Extensible  Messaging and Presence Protocol (XMPP) for exchanging data.

 

Web services can also form the foundation for service-oriented architecture or a Web-oriented architecture.

 

Deployment Concerns

One issue to consider is whether you'll use a SOAP-based  approach or a RESTful approach to Web services. Much has been written about the pros and cons of each. Here are a few notes on the pros and cons of each.

 

SOAP – SOAP-based Web services are supported by software vendors in SOAP WS toolkits, which makes it easy for enterprises to deploy on  SOAP. RESTful critics claim that changes to the SOAP stack could cause problems  with the service. Critics also say the use of XML as a messaging tool could create unnecessary overhead and slow down the service.

 

REST – RESTful Web services are supposed to be easier and leaner than SOAP-based Web services.  Amazon.com claims 80 to 85  percent of its Web services clients use REST. The main problem with REST is it's not supported by major vendors or their software development tools. Others  point out REST is so easy to build, you don't need a toolkit.

 

Dion Hinchcliffe wrote an overview of the REST versus SOAP debate in 2005 that's still useful today.