In simple words, webservices will establish a good mode of communication with other servers. Lets say like this, we have temperature widgets everywhere(android,ios,windows etc etc). Now you want to display temperature in your widgets..will you code everywhere to show the temperature? its a very bad idea..instead you can easily call up some webservices through api’s where your api will contact to yahoo temperature server and display temperature. Here yahoo server will have a kind of method in public where receives parameters from different clients and then process and send back responses to the websites through webservices. This is how webservices will work..the same procedure will follow for cricket score updates, currency updates etc etc. Hope this is clear to get an basic idea of webservices..
web service is a method of communication that allows two software systems to exchange this data over the internet. The software system that requests data is called a service requester, whereas the software system that would process the request and provide the data is called a service provider.
Different software might be built using different programming languages, and hence there is a need for a method of data exchange that doesn’t depend upon a particular programming language. Most types of software can, however, interpret XML tags. Thus web services can use XML files for data exchange.
Rules for communication between different systems need to be defined, such as:
- How one system can request data from another system
- Which specific parameters are needed in the data request
- What would be the structure of the data produced. Normally, data is exchanged in XML files, and the structure of the XML file is validated by an .xsd file.
- What error messages to display when a certain rule for communication is not observed, to make troubleshooting easier
All of these rules for communication are defined in a file called WSDL (Web Services Description Language), which has the extension .wsdl.
A directory called UDDI (Universal Description, Discovery and Integration) defines which software system should be contacted for which type of data. So when one software system needs one particular report/data, it would go to the UDDI and find out which other system it can contact for receiving that data. Once the software system finds out which other system it should contact, it would then contact that system using a special protocol called SOAP (Simple Object Access Protocol). The service provider system would first of all validate the data request by referring to the WSDL file, and then process the request and send the data under the SOAP protocol.