Newsletter |
What is Web Services, Web Services Introduction
What is Web Services ? Over the internet, you might have seen different kinds of definitions for Web services. My definition will almost resembles them 🙂 Web Services, the name it self indicates that its a service which is available over the Web, that’s it. As an example you can consider Java4s.com, When ever you hit the URL in the web browser it will gives you some output in HTML format, you can also consider this as a Web service.  With web services, we can communicate different applications on different platforms, i mean a java application in Windows platform can easily communicate with the application developed using .net/php in Linux operation system.
Understanding SOAP and REST
Web Services are mainly of 2 types, SOAP [Simple Object Access Protocol] and REST [Representational state transfer] based services. We have different type of specifications to implement SOAP and REST services. I believe so far you might be in confusion with these kind keywords like, JAX-RS, JAX-WS, RESTful, SOAP, Apache Axis2, Apache CXF bla bla…  Let me try to bring you out of them.
- JAX-RS provides the implementation of RESTful web services,  JAX-RS is a specification for RESTful Web Services with Java and it is given by Sun.  Since it is a specification, other frameworks can be written to implement these specifications, and that includes Jersey from Oracle, Resteasy from Jboss, CXF from Apache bla bla.
- JAX-WS, Apache Axis2 provides the implementation for SOAP
- Apache CXF provides implementation for SOAP and RESTful services both.
RESTful
What ever the data/response we will get from the server is known as Resource [remember this point], Each resource can be accessed by its URI’s.  We can get the resource from RESTful service in different formats like, HTML,XML,JSON,TEXT,PDF and in the Image formats as well, but in real time we mainly we will prefer JSON.  REST guidelines always talks about stateless communication between client and the Server.  Stateless means, every single request from client to server will be considered as a fresh request. Because of this reason REST always prefers to choose HTTP as it a stateless protocol.
- GET – Retrieve Data
- POST– Create/Insert Data
- PUT– Update Data
- DELETE– Delete Data
Generally we will prefer RESTful Services in these scenarios…
- If clients require caching, means if you have limited bandwidth
- If you want every thing to be stateless [ I have already explained about stateless ]
But SOAP gives the output only in XML format.  Hope you are good now 🙂 by the way we are going to use Jersey to implement JAX-RS specifications.
You Might Also Like
::. About the Author .:: | ||
In all these frameworks which frame work is more popular?
spring only one of the greatest framework in the it world nowdays
Hi,
can you please add an article describing difference between Restful web services and Restless Web Services ?
This web site is very good for beginners…
This web site is very good..
This web site is not very good… Its AWESOME..!!
We want SOAP Web service also please provide that also
This not complete tutorial on web services, So please include about SOAP also.
Hi Sivateja,
thanks for providing all the information about java technologies. mainly i am new to Web Services and learning easily from this site with your help. so can you please mail me some important basic Web Services tutorials for information if possible.
thanks.
No Doubt This is speechless site I mean like for beginner like a bless…
Nice explanation…
Can you explain about SOAP based web service also..?
Hello Sir,
Your way of explanation is very good. kindly keep on growing with lots of new content on various technology.
Hi Sir,
Excellent Info about webservices and REST.Need coding implemantion example for this it will improve
our understadings some more.
can you please upload the same for SOAP
Hi Sir,
Can u please upload the maven,ant and few front end technologies because ur website very useful for me.its a nice explanation.
Hi Siva,
Thank you for the wonderful posts.
How is the Rest service being able to provide Caching facility?
"If clients require caching, means if you have limited bandwidth"
I have confusion in the above line as you said that the Rest is stateless.
How is the caching achieved in REST.
Can you please explain.
Thanks.
Please explain about SOAP Web services too.
Nicely explained thanks
Please provide SOAP webservices explanation too
This web site is very nice..
its very good website for beginers it an excelent
Supeerbbb explanation……..
please please upload more tutorials regarding spring AOP, JavaScript,AngularJS
You are too good in explanation bro. Thanks
This website is very good