wood burning stoves 2.0*
The moose likes Web Services and the fly likes Difference between Web Services and Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Difference between Web Services and Servlets" Watch "Difference between Web Services and Servlets" New topic
Author

Difference between Web Services and Servlets

Abhishek Mulay
Greenhorn

Joined: Sep 19, 2010
Posts: 1
Hello,

Can anybody explain me what is the difference between Web-Services and Servlets ? Is the web service alternative to the Servlets ? Really confused....

Thank you,
Abhishek
pankaj rana
Greenhorn

Joined: May 04, 2007
Posts: 1

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 .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Web Services and Servlets
 
Similar Threads
Diff b/w Webserver & ApplicationServer
Difference between Message and RPC based Web Services ?
JMS vs Web services
web service vs messaging
Web Services Support in Eclipse 3.0