File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes What is the difference between servlet and webservice. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "What is the difference between servlet and webservice." Watch "What is the difference between servlet and webservice." New topic
Author

What is the difference between servlet and webservice.

dhaya nidhi
Greenhorn

Joined: Nov 05, 2009
Posts: 4
Hi Guys,

In one of my interview,interviewer asked me what is the diference between servlet and RESTful webservice.
I said webservice internally uses servlet.
Then he asked why do i need to go for webservlet instead of sevlet.
I said webservice return xml.so webservice can interact with other application like Dot Net,perl.
He said he can do the same in servlet.
I'm unanswerable to this question.

can any one please explain me what is the advantage of webservice over servlet.

Thanks in advance,

by
Dhaya

Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41508
    
  53
Does this previous discussion -which I found by searching for "difference servlet web service"- help? (Yes, that's a not too subtle reminder that you should SearchFirst.)


Ping & DNS - my free Android networking tools app
haripriya vedula
Greenhorn

Joined: May 31, 2008
Posts: 24
The main difference between a servlet and web services is, we will expose web services through the wsdl (web service description language) . so you can give wsdl to as many users of different platforms an languages.

Wsdl describes the service, what are the operations it does and where is it located. where as servlet cannot.

hope this is useful
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is the difference between servlet and webservice.