Web Services is a service can be written in any supporting languages such as Java, .Net …
Web Services establishes communication between two different applications over the network / inside the network.
Web Services are client and server applications that communicate over the World Wide Web’s (WWW) Hyper Text Transfer Protocol (HTTP).
Web Services can be integrated by any independent supporting languages.
Web Services provides security in terms of allowing consumer to access other services running in the producer end (Database, File System, any batch script, etc .. ) with out providing direct access to it.
Simple real time example to understand usage of Web Services.
Assume company ‘Y’ wants to share the data between company ‘X’ & company ‘Z’.
Here, ‘Y’ company should share data securely, ‘Y’ cannot be given complete database access to ‘X’ and ‘Z’. In this case just write a API to share required data and convert it to webservice; here ‘X’ and ‘Z’ will not know from which database the data they are fetching.
Via HTTP channel exposed API will have access to consumers (‘X’ and ‘Z’). Data will be shared via HTTP Response.