Search This Blog

Total Pageviews

Difference between WebService and Servlet

Servlet Web Service

Acess via HTTP(Hyper Text Transfer Protocol) Access via SOAP(Simple Object Access Protocol)

.Open URL Connection and put some parameter to the servlet if caller can put.  The caller does not know what parameters your servlet can receive either. Provide API to other applications, the WSDL file of your web service can give the caller enough information to invoke your web service

A more comprehensive and practical approach is to write a web service with a framework and to publish it on an application server or servlet container such as Tomcat or JBoss. In this case you would use a Servlet to handle the transport of the HTTP requests which transmit your SOAP or REST messages.

Servlet : 
A web component
Powerful Java technology
Managed by Container(Namely webserver)
Platform Independent
Interacts web clients as request-response Paradigm
Request handling methods *doGet, *doPost, *doDelete, *doOptions, *doHead, *doTrace
 Rest WS (Representational State Transfer Web Service) 

A way to achieving service oriented architecture in web application
It's an architectural concept
Web service resource is uniquely identifiable using URLS 
It has explicit relationship with HTTP methods namely GET,POST,PUT,DELETE
Highly re useable across the platform

Example Restful Web Service:

No comments:

MongoDB Tutorial MongoDB Tutorial Table of Contents Introduction to MongoDB Installation Creating a Database Creati...