A web service is a service that is offered by one automated device to another device in a way that both the devices can communicate with the help of the World Wide Web. Initially, web technology was developed to establish communication between humans and computers, but it is now used to make communication between two machines. A web service provides an object-oriented interface based on the web and is utilised by a different web server or by some other application which has a user interface.
You can call any software that is available on the internet as a web service if it uses an XML messaging system. To encode all the communications received the machine uses XML. The exchange of data can be done between systems, applications etc. For example, software applications that are written in a particular program can exchange data by using web services.
Components of Web service:
The platform for web service is XML and HTTP. The following are some of the components of a web service:
Simple Object Access Protocol (SOAP): SOAP is a protocol for exchanging information by implementing web services. It uses XML message format, and for message transmission and negotiation, it uses application layer protocols, Simple Mail Transfer Protocol and Hypertext Transfer Protocol.
Universal Description, Discovery, and Integration (UDDI): One of the goals of UDDI is to enable companies to find one another by streamlining online transactions. UDDI is more like a phone book where business can list themselves by their name, company or the service they provide.
Web Services Description Language (WSDL): WSDL describes how to call the service which is machine readable. It represents the functionality that is offered by a web service.
How does a web service establish communication?
The web services use XML, HTML, SOAP (Simple Object Access Protocol), WSDL (Web Services Description Language) to enable communication among different applications. It takes the help of XML for tagging the data; it uses SOAP to transfer a particular message and to describe the availability of a service it uses WSDL (Web Services Description Language).
Automated design methods:
You can use the help of automated tools to create web services. A developer who uses the bottom-up model first writes the implementing class and then he/she exposes the methods as web services by using the WSDL tool. If the original classes are constantly going to change then, it may be quite hard to maintain. A person who is using the top down model first writes the WSDL document and then later he/she produces the class skeleton with the help of the code generating tool. The top-down model may be harder to develop, but it is quite easy to maintain, and it produces cleaner designs. The top-down model also does not get affected much by any change.