.NET Web Services


A web service is a standard platform for building interoperable distributed applications.



What’s a Web Service?

A web service is a standard platform for building interoperable distributed applications. It allows you as a developer, to interact with other information providers without worrying about what they are running either at the backend or even their front-end.
Web Services are pieces of program logic that are programmatically available via the Internet. These pieces of program logic which are in the form of objects, can be invoked from any client over HTTP (Hypertext Transfer Protocol). It functions primarily through XML in order to pass information back and forth through HTTP. By allowing data interchange in the standard XML format, anybody can pick up the data and use it.
Basically, you can author a web service and make its properties and methods available to other developers across the web, without writing vast amounts of documentation for an API or distributing DLLs to everyone who wishes to use them.
In a typical web services scenario, a business application sends a request to a service at a given URL, using the SOAP protocol over HTTP. The service receives the request, processes it, and returns a response. An often-cited example of a web service is that of a stock quote service, in which the request asks for the current price of a specified stock, and the response gives the stock price. This is one of the simplest forms of a web service in that the request is filled almost immediately.
A Web Service is defined as "a component of programmable application logic that can be accessed using standard web protocols". It's basically a component, or an assembly in ASP.NET, that can be accessed over the web.
The concept of sending messages between servers or remotely calling functions is not new. Technologies such as DCOM (Distributed Component Object Model) and CORBA (Common Object Request Broker Architecture) are well-known proprietary protocols that have been in use for years.
What is new is, web services use a standard protocol called SOAP to transfer messages over HTTP. SOAP makes it possible for applications written in different languages running on different platforms to make remote procedure calls (RPC) effectively, even through firewalls.

DCOM doesn't use port 80, which is reserved for HTTP traffic; this causes DCOM calls to be blocked by firewalls. SOAP calls use port 80, which makes it possible to call procedures that exist behind firewalls.



Protocols Used By Web services

Web services use the standard web protocols HTTP, XML, SOAP, WSDL, and UDDI.

HTTP

HTTP (Hypertext Transfer Protocol) is the set of rules for transferring files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. As soon as a Web user opens their Web browser, the user is indirectly making use of HTTP. HTTP is an application protocol that runs on top of the TCP/IP suite of protocols (the foundation protocols for the Internet).
HTTP is standardized by the World Wide Web Consortium (W3C).
HTTP is called a stateless protocol because each command is executed independently, without any knowledge of the commands that came before it. This is the main reason that it is difficult to implement Web sites that react intelligently to user input. This shortcoming of HTTP is being addressed in a number of new technologies, including ActiveX, Java, JavaScript and cookies.

XML

XML(Extensible Markup Language), a specification developed by the W3C. XML is a pared-down version of SGML, designed especially for Web documents. It allows designers to create their own customized tags, enabling the definition,transmission, validation, and interpretation of data between applications and between organizations.

SOAP

SOAP(Simple Object Access Protocol), a lightweight XML-based messaging protocol used to encode the information in Web service request and response messages before sending them over a network. SOAP messages are independent of any operating system or protocol and may be transported using a variety of Internet protocols, including SMTP, MIME, and HTTP.

WSDL

WSDL(Web Services Description Language), an XML-formatted language used to describe a Web service's capabilities as collections of communication endpoints capable of exchanging messages. WSDL is an integral part of UDDI, an XML-based worldwide business registry. WSDL is the language that UDDI uses. WSDL was developed jointly by Microsoft and IBM.

UDDI

UDDI(Universal Description, Discovery and Integration). A Web-based distributed directory that enables businesses to list themselves on the Internet and discover each other, similar to a traditional phone book's yellow and white pages.
UDDI is a public registry, where one can publish and inquire about web services.