Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Web Services - What exactly are they?

What does a Web service really mean ? I am not looking for a theoretical explanation, I am looking for something practical.

I was thinking that anything I can call from an external client is a Web service, so a basic PHP which returns JSON data could be a Web service.

But then I started reading about Web services in W3Schools.org and I got confused. If the PHP URL which returns JSON data is a web service, why would I need to do SOAP, WDSL etc ... to create a Web service. Isn't it extra work?

Also, if SOAP is the way data is sent back and forth, what about other transport types?

What differentiates a RESTful Web service from a SOAP based web service?

like image 625
Mushtaq Jameel Avatar asked Jul 04 '13 19:07

Mushtaq Jameel


1 Answers

When you are talking about a webservice people generally misunderstand what it means, a webservice is simply a way to interact between a and b that abstracts the use of local technology standards. A WSDL defines the way in which the SOAP message is being sent over the channel. REST uses JSON over HTTP, WSDL uses SOAP over HTTP.

The advantage of a webservice is, say you develop one piece of code in .net and you wish to use JAVA to consume this code. You can interact directly with the abstracted layer and are unaware of what technology was used to develop the code.

SOA is a set of design paradigms and standards that tell you how to develop your services, in SOA each service is meant to comply with the principles listed below. WSDL is generally linked with but not essential for a SOA solution. If you wish to learn about SOA google "Thomas Erl SOA".

Priciples of SOA

  • Standardized service contract
  • Service loose coupling
  • Service abstraction
  • Service reusability
  • Service autonomy
  • Service statelessness
  • Service discoverability
  • Service composability
like image 153
user2313879 Avatar answered Nov 15 '22 06:11

user2313879