Why do we need Web service?
Why do we need to use Web service?
We should use web services as it comes with various advantages listed below
Re-usability
Once we develop some business logic,we can make it reuse for other applications
Example:
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.
Interoperability
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.
Loosely coupled
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.
Deployability
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.
Hi KB Sir,
Can i use php code to write webservice to connect between java and .Net application.
Example: my application(Java) want to reuse weather forecast information from other application(.Net) so here can i use PHP code reuse weather forecast business logic from .Net to my java application
Yes , you can use.
Check below link for the same
http://php.net/manual/en/refs.webservice.php