Web Service defines higher level abstraction such as some business specific functionality and can be defined using PHP,
Java, C# or any other language. While Servlet is just a software implementation component responsible for transport of data. A servlet is an HTTP query handler. You can do what you want with your incoming queries
You access servlet via HTTP while you access Web Service via
SOAP (Simple Object Access Protocol).
web services are used to provide API to other applications, the WSDL file of your web service can give the caller enough information to invoke your web service But, in fact, you can not directly invoke a servlet, you can only open URL connection and put some parameter to the servlet if the caller is out of your application. And you can not restrict what parameters the caller can put. The caller does not know what parameters your servlet can receive .