Components of Web Services

Components of web services includes :

  • SOAP
  • WSDL
  • UDDI

Simple Object Access Protocol (SOAP) :

  • SOAP is the standard messaging protocol used by Web services.
  • It is a lightweight XML based messaging protocol intended for exchanging structured information in a decentralized, distributed environment.
  • SOAP’s primary application is inter application communication.
  • SOAP specifications provide a formal set of conventions that governs how SOAP messages are generated and accepted by SOAP nodes (i.e., senders, receivers and intermediaries).
  • SOAP codifies the use of XML as an encoding scheme for request and response parameters using HTTP as a means for transport.
  • Like XML, SOAP also is independent of the application object model, language, and running platforms or devices.

A SOAP message is enclosed in a SOAP envelope that contains a SOAP header and a SOAP body. The SOAP body is mandatory, whereas the SOAP header is optional. The SOAP message is the basic unit of communication between SOAP nodes.

Below is a sample SOAP Message Request :


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                  xmlns:emp="http://employees.ws.bemach.com/">
    <soapenv:Header/>
    <soapenv:Body>
        <emp:getEmployee>
            <emplNo>100011</emplNo>
        </emp:getEmployee>
    </soapenv:Body>
    </soapenv:Envelope>

                                                

SOAP covers the following four main areas:

  • A message format for one-way communication describing how a message can be packed into an XML document.
  • A description of how a SOAP message should be transported using HTTP (for Webbased interaction) or SMTP (for e-mail-based interaction).
  • A set of rules that must be followed when processing a SOAP message and a simple classification of the entities involved in processing a SOAP message.
  • A set of conventions on how to turn an RPC call into a SOAP message and back.

Advantages of SOAP :

  • Simplicity : Based on highly-structured format of XML
  • Portability: No dependencies on underlying platform
  • Firewall friendliness : By posting data over HTTP
  • Use of open standards : text-based XML standard
  • Interoperability : Built on open technologies (XML and HTTP)
  • Universal acceptance : Most widely accepted message communication standard

Disadvantages of SOAP :

  • much reliance on HTTP : limited only to request/response model and HTTP's slow protocol causes bad performance.
  • Statelessness : difficult for transactional and business processing applications.
  • Serialization by value and not by reference : impossible to refer or point to external data source.

Web Services Description Language ( WSDL) :

  • WSDL stands for Web Services Description Language. It is pronounced as 'wiz-dull'.
  • WSDL is an XML schema based specification for describing Web services as a collection of operations and data input/output parameters as messages.
  • It describes a set of SOAP messages and how the messages are exchanged.
  • WSDL was developed jointly by Microsoft and IBM.

Features of WSDL :

  • WSDL is an XML-based protocol for information exchange in decentralized and distributed environments.
  • WSDL definitions describe how to access a web service and what operations it will perform.
  • WSDL is a language for describing how to interface with XML-based services.
  • WSDL is an integral part of Universal Description, Discovery, and Integration (UDDI), an XML-based worldwide business registry.
  • WSDL is the language that UDDI uses.

WSDL is often used in combination with SOAP and XML Schema to provide web services over the Internet. A client program connecting to a web service can read the WSDL to determine what functions are available on the server. Any special datatypes used are embedded in the WSDL file in the form of XML Schema. The client can then use SOAP to actually call one of the functions listed in the WSDL.

WSDL has three parts:

  • Definitions
  • Operations
  • Service bindings

Definitions are generally expressed in XML and include both data type definitions and message definitions that use the data type definitions. These definitions are usually based on some agreed upon XML vocabulary.

Universal Description, Discovery and Integration (UDDI) :

UDDI is a platform-independent, extensible world markup language(XML)-based registry by which businesses worldwide can list themselves on the Internet, and a mechanism to register and locate web service applications. UDDI is an open industry initiative, sponsored by the Organization for the Advancement of Structured Information Standards (OASIS), for enabling businesses to publish service listings and discover each other, and to define how the services or software applications interact over the Internet.

UDDI enables a business to :

  • describe its business and its services;
  • discover other businesses that offer desired services;
  • integrate (interoperate) with these other businesses.

UDDI was originally proposed as a core Web service standard .It is designed to be interrogated by SOAP messages and to provide access to Web Services Description Language (WSDL) documents describing the protocol bindings and message formats required to interact with the web services listed in its directory.

A UDDI business registration consists of three components :

  • White Pages — address, contact, and known identifiers;
  • Yellow Pages — industrial categorizations based on standard taxonomies;
  • Green Pages — technical information about services exposed by the business.