tags:

views:

507

answers:

13

To me, these terms sound very similar. Is there a difference really?

+10  A: 

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

Oded
In addition of course, 'web server' is also used to define the role of the physical or virtual machine that runs the web server software and is often referred to it as such, "Can you copy the files up to the web server?"...clearly not meaning the web server daemon/service.
Wim Hollebrandse
Funny enough, I took the definitions from Wikipedia and summarized it in a single sentence.
The Elite Gentleman
+1  A: 

Server is a "machine" to dispatch user HTTP request and host web project, including also web services.

Dewfy
A: 

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.

Pawel J. Wal
+2  A: 

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?

The Elite Gentleman
Does a thing as '*too* tecnical' exist? Surely not on SO!
Wim Hollebrandse
Technically, you're correct Wim, LOL.
The Elite Gentleman
+1  A: 

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.

Moron
+1  A: 

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 ;)

ron
+1  A: 

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.

Aseem Gautam
"Web Servers have a specific purpose of delivering web content whereas Web Services have a broader role to play" Eh? Web Servers also happen to serve web services apps. Can't see how you would say web services have a broader role to play than a web server, when the former is a specific type of application that runs on the latter.
Wim Hollebrandse
+4  A: 

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.

Binary Worrier
+1  A: 

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

Marcello Faga
+1  A: 

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.

slugster
+1  A: 

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.

herzmeister der welten
+3  A: 

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.

crimson13
web services do not necessarily rely on the http protocol, and as such, do not necessarily run in web servers. This answer is inaccuarate
Pedro Morte Rolo
+1  A: 

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.

Pedro Morte Rolo