To me, these terms sound very similar. Is there a difference really?
A web service will be running on a web server.
A web server is a piece of software designed to serve web pages/web sites/web services. Examples are IIS, Apache and many more. The name can also refer to the hardware running this software.
As web service will be running inside a web server - normally serving up XML or performing some action in response to input.
From wikipedia:
Web services today are frequently just Application Programming Interfaces (API) or web APIs that can be accessed over a network
Server is a "machine" to dispatch user HTTP request and host web project, including also web services.
To my knowledge, a "web service" is a programmed component, that provides a certain functionality, while a "web server" is either a machine that runs software to provide for web service's needs, or the software itself.
In a nutshell:
A Web Service is an application that can be accessed over a network, such as the internet. A Web Server is a program that delivers content over HTTP.
So, if you want your Web service to be accessed over the internet, you'll set it up on a Web Server.
Should we need to go too technical?
Web Service is a specific kind of web server, which (usually) provides a set of methods which arbitrary clients can call: something like a remote API mechanism.
Web server is just a generic term and would include not just web services, but http servers etc.
Maybe from an underlying technology perspective there is not much difference (request-response going over a channel), but the purpose diversifies the meaning:
- Web server usually refers to delivering web page content for a user.
- Web service refers to an API invocable over standard web protocols.
Of course nowadays with the coming of Web 3.5 the borders between phrases becomes fuzzy ;)
From wikipedia:
A web server is a computer program that delivers (serves) content, such as web pages, using the Hypertext Transfer Protocol.
Web services today are frequently just Application Programming Interfaces (API) or web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services.
Though both are some sort of a computer program but with different purpose. Web Server's have a specific purpose of delivering web content whereas Web Services have a broader role to play.
Definition of Web Server
Definition of WebService
A Web Server generally refers to software running on a physical or virtual machine that processes web requests (e.g. returning pages to browsers and executing calls to Web Services)
A Web Service runs in a Web Server performing tasks and (generally) returning structured data to a calling program, rather than html for a browser.
Hello Dimitri
I hope to be useful to you saying you that :
A "web server" is a server application (like Microsoft IIS or Apache) which is used to compile and run websites, or "web application". A "web server" can host some "web services" too.
A "web service" is a component installed over a "web server". These components could be called by a website or a "web application" using HTTP requests.
If you want more information about that consult MSDN, searching the "web service" string
Bye
Because no-one else has mentioned it yet, there are two types of webservice (in Microsoft land): WCF and asmx. WCF services are "hosted" by IIS, asmx webservices run within IIS. WCF services can also be hosted by a separate self contained service (and you can still use HTTP to connect to it).
Webservices is a huge subject, you really should start somewhere like here.
To add to the given answers, it would make more sense to ask "What is the difference between a web service and a (by-server-created) web page".
Technically there is none. They both output something XML-ish after a request.
A web service is an application that is run by a web server and that results in a series of URLs that will return their data in a format that is intended to be parsed by a 'generic' computer program instead of by a browser. As a result web services can use any data format they want (as long as both sides agree), but typically something like XML (specifically SOAP or so) or JSON is used.
Many of these answers are wrong.
While a Web Server is necessarily an HTTP server, a Web Service is simply a service that is available thru the network. As the protocol may not be HTTP, you may provide WebServices over mail or other protocols, and you do not need a web server for that.
The transport channel used by Web Services doesn't necessarily need to be the HTTP protocol.
The term "Web Services" is also used to refer to the SOAP xml standard, that is a standard way to encode the information in Web Service invocations.