WEB SERVICE – INTRO

Web services use XML & HTTP  to exchange data between applications developed using different/same technologies and platforms. For example, transferring money from one bank account to another using third-party applications like XOOM, Remit2India etc.

Major components of web services are WSDL, UDDI and SOAP.

Web Services Description Language (WSDL)

It is a document written in XML. It specifies the location of the service and the operations (or methods) the service exposes. For example, banking applications expose credit/debit methods to other banks and money transfer applications.

Key elements of WSDL –

WSDL_11vs20

Compared to Java programming, “portType” is a class, “operation” is a method with input parameters and return value, “message” represents parameters of a method.

More on WSDL and WSDL Examples

Universal Description, Discovery and Integration (UDDI)

UDDI uses WSDL to describe interfaces to web services. Problems the UDDI specification can help to solve:

  • Making it possible to discover the right business from the millions currently online
  • Describing services and business processes programmatically in a single, open, and secure environment
  • Expanding offerings and extending market reach

u

Example – If the industry published an UDDI standard for flight rate checking and reservation, airlines could register their services into an UDDI directory. Travel agencies could then search the UDDI directory to find the airline’s reservation interface. When the interface is found, the travel agency can communicate with the service immediately because it uses a well-defined reservation interface.

More Info 1, 2, 3

Simple Object Access Protocol (SOAP)

SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages. SOAP is a protocol for accessing web services.

A SOAP message is an XML document containing the following elements:

soap-message

The optional SOAP Header element contains application-specific information (like authentication, payment, etc) about the SOAP message.

The SOAP Body element contains the actual SOAP message.

The SOAP Fault element holds errors and status information for a SOAP message. If a Fault element is present, it must appear as a child element of the Body element. A Fault element can only appear once in a SOAP message.

More Info 1, 2, 3

Reference :

http://www.w3schools.com/webservices/

http://docs.oracle.com/javaee/6/tutorial/doc/bnayk.html

Advertisements