What is a Web Service?
A Web service is defined by the W3C as "a software system designed to support interoperable machine-to-machine interaction over a network".
In other words, Web Services are frequently just a Web APIs that can be accessed over a network (like Internet) and executed on a remote system hosting the requested services.
How is Web Service different from a traditional RPC?
RPC (Remote Procedure Call) belongs to the first generation distributed computing technology. They are typically used with in a enterprise, are dependent on a particular programming language, and are tightly-coupled with the object model and the implementing programming language. Subjected to these factors systems built on RPC technology doesn't support adhoc interaction across various RPC's across the internet.
Web Services as defined are not dependent on a particular programming language are are not tightly-coupled with the object model of the service implementation as the communication under Web Services model is through exchange of XML messages and thus makes enterprise to enterprise communication in an ad-hoc manner over the internet.
Typical characteristics of Web Services:
Web Services are based on -
Why Web Service?
Brief Notes on the Web Service Standards - SOAP, WSDL, UDDI and REST
SOAP
SOAP (Simple Object Access Protocol) is a wire-protocol (like IIOP and JRMP). In other words, it specified rules of how data types get serialized over the wire. All the encoded data under SOAP protocol are in a XML representation.
SOAP is a communication protocol for invoking business logics that are captured in component models like Java beans, EJB, etc.
SOAP is not a programming language rather it is a portable communication protocol and all SOAP messages have to be produced, processed and manipulated by a programming language (Java is a most commonly used language for producing, processing and manipulating SOAP messages).
SOAP communication protocol defines the following:
WSDL
WSDL (Web Service Description Language) is a XML language for describing Web Services
Using WSDL Web Service is described as a set of communication endpoints (ports) that are capable of exchanging messages. Each port is made of two parts. First part is abstract definitions of operations and messages. The second part is concrete binding of those abstract definitions of operations to concrete network protocol and message format.
WSDL as a standard description of web services enables automation of communication details in an application to application communication. WSDL document can be used to identify various services available and how to make them without manual pre-arrangement or pre-configuration between the two.
UDDI
The UDDI (Universal Description, Discovery, and Integration) standard provides a mechanism for businesses to "describe" themselves and the types of services they provide and then register and publish themselves in a UDDI Registry. Such published businesses can be searched for, queried, or "discovered" by other businesses using SOAP messages.
REST
REST means REpresentational State Transfer. This architectural style of web service is defined by Roy Fielding in his P.Hd Thesis as contrary to the SOAP style of programming webservices. In this style of webservices all the messages are transferred over HTTP protocol and are sent as web traffic.RESTful services are stateless and each request from client to server must contain all the information necessary to understand the request. REST services are easy to work with as
The main difference between RESTful services and SOAP based services are -