title: I need to learn Web Services in Java. What are the different types in it?
body: <p>Recently, I decided to start learning about java web services and when I started to search a tutorial for java web-services in google, I found out that there are many types of webservices XML based, SOAP based, also RESTful webservices. </p>
  
  <p>Also, I found that there is a JAX-WS specification for xml based web-services, and JAX-RS specification for creating RESTful webservices. </p>
  
  <p>Q1) I got confused, it would be great if anybody can help me understanding the difference between these different type of webservices, so that I can decide which one to learn first.</p>
  
  <p>Q2) Also, I want to learn in-depth about creating different types of web-services in java. Is there any tutorial or resources which can give an insight to each kind of webservice and a comparison between them.  </p>
  
  <p>Q3) based on what scenarios and conditions should I decide that I want to create an XML based web-service rather than a SOAP service or I should go with RESTful service.</p>