Print

Web Service

Web Service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards. (wikipedia)
  • An open standard that focus on communication and collaboration among applications
  • The fundamental building blocks of distributed computing on the Internet
  • Usually not a complete application but a functional component of a larger solution
  • Primarily oriented toward program-to-program interaction
  • Can be any type of application such as a Windows application, a server process, or an XML Web service

Before and After Web Service


Before Web Services: Sharing of information depends on who you are working with and software must be written accordingly, leading up to software being rewritten many times.



After Web Services: Sharing of information is more flexible and follows the write code once, reuse multiple times.

Web Service Directory

A Web directory is a listing of Web sites organized in a hierarchy or interconnected list of categories.

Web Service in Action


((http://acs.lbl.gov/gtg/projects/pyGridWare/doc/tutorial/html/x284.html)

Protocols

Simple Object Access Protocol (SOAP)

  • An XML-based protocol for applications to communicate with one another and exchange information between computers with different platforms
  • Main focus: Remote Procedure Calls (RPC) transported via HTTP.

Web Service Description Language (WSDL)

  • Specifies enough detail of the Web service in XML format for a programmer to develop a client to access the service
  • XML Web services programmers do not need to know the details of the platform or language used to implement the service; the only requirement is that the programmer be able to formulate requests and process responses using the correct protocol and message structure defined in WDSL.
  • Elements
    • definitions: the name of the web service; namespaces used throughout the remainder of the document; service elements.
    • types: a container for data type definitions used by the web service.
    • message: the data elements of an operation.
    • portType: a set of operations supported by one or more endpoints.
    • binding: the protocol and data formats for the operations and messages defined for a particular port type.
    • service: the address for invoking the web service.
  • Tutorials:

    XML Services Access

    • HTTP GET Access: access the service via http (http://url/WebServiceName.asmx?op=WebServiceName)
    • HTTP POST Access: access the service via a HTML form
    • SOAP Access: low-level access that  handles more complex structures
      • SOAP is the most important Web service access protocol because it handles more complex structures like DataSets, arrays, custom types, and XML files.
      • In .NET, The SOAP operation is being taken care through a Web service proxy created the wsdl.exe utility or Visual Studio.
      • Whenever the client makes a call to a web service function, the proxy generates an HTTP request and sends it to the server.  When the response in XML is received, the proxy parses and returns the results.

    XML Web Service vs. Web API

    • XML web services use XML messages that follow the SOAP standard and have been popular with the traditional enterprises. In such systems, there is often a machine-readable description of the operations offered by the service written in the WSDL.
    • A Web API is a development in Web services where emphasis has been moving to simpler representational state transfer (REST) based communications. RESTful APIs do not require XML-based web service protocols (SOAP and WSDL) to support their light-weight interfaces.