Web services are self-contained, modular applications that can be described, published, located, and invoked over a network. Any piece of code can be transformed into a Web service. Services can be legacy functions or new software. Also, all components in a system can become services.
Web services reflect a new "service-oriented" approach to programming, based on the idea of building applications by discovering and implementing network-available services, or by invoking available applications to accomplish some task. This "service-oriented" approach is independent of specific programming languages or operating systems. Instead, Web services rely on pre-existing transport technologies (such as HTTP) and standard data encoding techniques (such as XML) for their implementation.
The key components of a Web service are: