This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 39542
    
  27
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 - updated with new look and Ping home screen widget
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.
 
Similar Threads
XML schema and dtd
Servlet models
I need to know what is the different between webservice and corba?
Strange offer too
Difference between servlet and restful webservice