Web Service : Simple Description
Simply put a web service is a service or information delivered to a client which may be a system or a “human” who make sense of this data based on their requirement or perspective.
Most of these output is either in form of XML or JSON(JavaScript Object Notation), Soap (More about SOAP) is a combination of data and meta-data, which the requesting system uses to interpret it. JSON is fast gaining popularity as it looks cleaner and is easy to understand. Its a comma delimited key-value pair kind of data, very easy to understand in fathom.
SOAP which was and even now used a lot in enterprise system is losing popularity as the configuration required to make it work is lot more than REST, an unofficial system of using already defined protocols like GET/POST/HEAD/PUT/DELETE to perform operations using Web Services.
So simply a client and server communicate in system independent manner by exchanging data in XML or JSON format, no matter if the client is a Javascript or Java program, or the back-end data is written in Dot Net or J2EE.You just send a request to a uniform resource location or url with or without parameter and you get back a response,interpret it and display to view, or perform other operation.

Understanding Web Service
The different HTTP methods help differentiate what the request from the client want to perform, example a GET asks for data and DELETE asks for deletion of some data, although these are being used for some time now and are standardized the programmer can still interpret these as he wants and perform customized actions.
You can easily find free web services on the internet to test your programs with like http://www.webservicex.net the WSDL or simply a document can be found there which describes the input the service takes and the data it returns, also other informations like service name and url.
SOAP puts the data inside the predefined XML so the xpath is used to fetch it and REST generally attaches the input parameters to the url and now-a-days receives a JSON file as output from the server. So XML-RPC has transitioned to legacy technology, the good old friend which use to take a parameter and return us the XML with those custom tags in the POST body is fast losing popularity.
Comments
Post a Comment