Why do we need to use Web service?
We should use web services as it comes with various advantages listed below
Once we develop some business logic,we can make it reuse for other applications
If 10 different applications requires to use our logic
We can expose our logic over a network as a web service
So all the 10 different application can access it from the network.
It provides the freedom for a developers to choose whatever the technology they want to use for development.
Web services uses a set of standards and protocols and enable us to achieve interoperability.
Hence applications developed in Java,Mainframe,Ruby or any other technology can call the web service and use it.
Web service exist independent of the other parts of the application that uses it.
So any changes to the application can be made without affecting the web service.
It is very easy to deploy the web application as they are deployed over standard internet technologies.
Because of which, web services can be deployed even on the servers which are running firewall.