Mushtaq Jameel
Mushtaq Jameel

Reputation: 7083

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?

Upvotes: 5

Views: 4577

Answers (2)

Thomas
Thomas

Reputation: 2767

This Q&A Restful vs Other Web Services brings a lot of light to what is a webserver, and differences from SOAP and REST. Id recommend to read all the answers (many of them are very good).

Upvotes: 0

user2313879
user2313879

Reputation: 188

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

Upvotes: 8

Related Questions