I have googled about "web service" and I also read it in wiki:
A Web service is a method of communications between two electronic devices over the World Wide Web
However I can not make it clear about what is the web service mean.
How about the common http request which return xml or json rather than a html content? For example:
http://www.server.com/ws/getitem?id=xxxx
This is a interface used to get item detail by id, while return data of json or xml format.
Now if we implement it by so said web service manner, what will be done?
A normal web page returns HTML, PDF, or image data that's intended to be displayed to the user in a browser.
A web service returns data that's intended to be used by another program, rather than displayed directly to the user; another common term for this is API, i.e. Application Programming Interface. Rather than returning HTML, it returns data that's structured to be easy for computers to extract the values. Common formats are XML and JSON. The web service might also use a structured format for requests, such as SOAP or WSDL, but some (like your example) just use URL query parameters.
Both web services and normal web pages use HTTP as the data transfer protocol. The difference is in how they're used by clients.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With