Web Services (WS) are business logic components which provide functionality via the Internet using standard protocols such as HTTP. It can convert your application into a Web-application, which can publish its function or message to the rest of the world. I.e. WS describes a standardized way of integrating Web-based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet protocol backbone.Thus it is a method of communication between two electronic devices over a network.WS uses Simple Object Access Protocol (SOAP) in order to expose the business functionality. SOAP defines a standardized format in eXtensible Markup Language (XML) which can be exchanged between two entities over standard protocols such as HTTP. SOAP is platform independent so the consumer of a Web Service is therefore completely shielded from any implementation details about the platform exposing the Web Service. For the consumer it is simply a black box of send and receive XML over HTTP. So any web service hosted on windows can also be consumed by UNIX and LINUX platform.Simple Object Access Protocol (SOAP)SOAP is an XML-based protocol that enables software components and applications to communicate with one another. It defines rules to translate application and platform-specific data into the XML format. SOAP allows you to communicate with the Web Service using protocols such as HTTP and Simple Mail Transfer Protocol. SOAP has three main sections:-Envelope: Contains elements such as the header and body of the SOAP messaging structure. It also includes an encoding Style attribute that specifies the representation of data in messages.Header: Encapsulates extended messages without adding or modifying the standard message flow.Body: Contains Web application-specific data. It defines the purpose of sending the message. The body element should be the first element under the envelope element if there is no header element.Web Services Description Language (WSDL)WSDL is an XML-based file that describes a Web service. A WSDL document describes the methods provided by a Web service and the input, output, and connection parameters. Web service definitions can be mapped to any implementation language, platform, object model, or messaging system. Simple extensions to existing Internet infrastructure can implement WS for interaction via browsers or directly within an application. The application could be implemented using COM, JMS, CORBA, COBOL, or any number of proprietary integration solutions.Universal Description, Discovery and Integration(UDDI)UDDI is an industry standard that is used to locate WS on the Internet. It is an XML-based registry that enables enterprises to list their WS on the Internet. UDDI enables organizations to perform secure online transactions. The UDDI company registry contains a comprehensive list of available WS and provides links to discovery documents of WS. These discovery documents, called DISCO files, contain links to WSDL documents.Web services do not provide the user with a GUI. WS share business logic, data and processes through a programmatic interface across a network. Developers can then add the Web service to a GUI (such as a Web page or an executable program) to offer specific functionality to users. WS do not require the use of browsers or HTML.Web services allow different applications from different sources to communicate with each other without time-consuming custom coding, and because all communication is in XML, WS are not tied to any one operating system or programming language. For example, Java can talk with Perl, Windows applications can talk with UNIX applications.Advantages & Disadvantages of WS
Interoperability – This is the most important benefit of WS. WS typically work outside of private networks, offering developers a non-proprietary route to their solutions. WS also let developers use their preferred programming languages. WS are virtually platform-independent.
Usability – WS allow the business logic of many different systems to be exposed over the Web.
Reusability – WS provide not a component-based model of application development, but the closest thing possible to zero-coding deployment of such services. This makes it easy to reuse WS components as appropriate in other services.
Deployability – WS are deployed over standard Internet technologies. This makes it possible to deploy WS even over the fire wall to servers running on the Internet on the other side of the globe.
The problem with HTTP and HTTPS when it comes to WS is that these protocols are “stateless”-the interaction between the server and client is typically brief and when there is no data being exchanged, the server and client have no knowledge of each other. More specifically, if a client makes a request to the server, receives some information, and then immediately crashes due to a power outage, the server never knows that the client is no longer active. The server needs a way to keep track of what a client is doing and also to determine when a client is no longer active.