Web service
From Wikipedia, the free encyclopedia
The W3C defines a Web service[1] as a software system designed to support interoperable machine-to-machine interaction over a network. Web services are frequently just application programming interfaces (API) that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.
The W3C Web service definition encompasses many different systems, but in common usage the term refers to those services that use SOAP-formatted XML envelopes and have their interfaces described by WSDL. For example, WS-I only recognizes Web services in the context of these specifications.
Contents |
[edit] Core specifications
The specifications that define Web services are intentionally modular, and as a result there is no one document that defines it. Instead, there are a few "core" specifications that are supplemented by others as the circumstances and choice of technology dictate. The most common are:
- SOAP: An XML-based, extensible message envelope format, with "bindings" to underlying protocols (e.g., HTTP, SMTP and XMPP).
- WSDL: An XML format that allows service interfaces to be described, along with the details of their bindings to specific protocols. Typically used to generate server and client code, and for configuration.
- UDDI: A protocol for publishing and discovering metadata about Web services, to enable applications to find Web services, either at design time or runtime.
- WS-Security: Defines how to use XML Encryption and XML Signature in SOAP to secure message exchanges.
- WS-ReliableExchange: A protocol for reliable messaging between two Web services.
Most specifications are standardized at OASIS and the W3C. Additionally, WS-I develops profiles, sample applications and test tools to further promote Web services interoperability.
See List of Web service specifications for a more complete listing.
[edit] Styles of use
Web services is a set of tools that can be used in a number of ways. The three most common styles of use are RPC, SOA and REST.
[edit] Remote Procedure Calls
RPC Web services present a distributed function (or method) call interface that is familiar to many developers. Typically, the basic unit of RPC Web services is the WSDL operation.
The first Web services tools were focused on RPC, and as a result this style is widely deployed and supported. However, it is sometimes criticised for not being loosely coupled, because it was often implemented by mapping services directly to language-specific function or method calls. Many vendors felt this approach to be a dead end, and pushed for RPC to be disallowed in the WS-I Basic Profile.
[edit] Service Oriented Architecture
Web services can also be used to implement a Service-oriented architecture (SOA), where the basic unit of communication is a message, rather than an operation. This is often referred to as "message-oriented" services.
SOA Web services are espoused by most major software vendors and industry analysts. Unlike RPC Web services, loose coupling is more likely, because the focus is on the "contract" that WSDL provides, rather than the underlying implementation details.
[edit] Representational State Transfer
Finally, RESTful Web services attempt to emulate HTTP and similar protocols by constraining the interface to a set of well-known, standard operations (e.g., GET, PUT, DELETE). Here, the focus is on interacting with stateful resources, rather than messages or operations.
RESTful Web services can use WSDL to describe SOAP messaging over HTTP, which defines the operations, or can be implemented as an abstraction purely on top of SOAP (e.g., WS-Transfer).
[edit] Criticisms
Critics of Web services often complain that they are too complex [2] and biased towards large software vendors or integrators, rather than open source implementations.
There are also concerns about performance, because of Web services' use of XML as a message format.
[edit] Similar efforts
There are several other approaches to the set of problems that Web services attempts to address, both preceding and contemporary to it. RMI was one of many middleware systems that have seen wide deployment. More ambitious efforts like CORBA and DCOM both attempted to effect distributed objects, which Web services implementations sometimes try to mimic.
More basic efforts include XML-RPC, a precursor to SOAP that was only capable of RPC, and various forms of using HTTP without SOAP.
[edit] External links
- W3C Web Services Activity home page
- Web Services Architecture (W3C Working Group Note)
- An Introduction to the Web Services Architecture and its Specifications (Microsoft white paper)
- Secure, Reliable, Transacted Web Services (IBM/Microsoft white paper)
[edit] Notes
- ^ Many sources also capitalize the second word, as in Web Services
- ^ http://www.tbray.org/ongoing/When/200x/2004/09/21/WS-Research