• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is the difference between servlet and webservice.

 
dhaya nidhi
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
haripriya vedula
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic