| 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.
| 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 | |
| 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:
https://www.blogger.com/blogger.g?blogID=7055677709707967633#editor/target=post;postID=8533043289233288986;onPublishedMenu=posts;onClosedMenu=posts;postNum=3;src=postname
No comments:
Post a Comment