Wednesday, March 28, 2012

Introduction to WebServices




·         Web services are application components
·         Web Services are published, found, and used through the Web.
·         Web services communicate using open protocols
·         Web services are self-contained and self-describing
·         Web services can be discovered using UDDI
·         Web services can be used by other applications
·         XML is the basis for Web services
·         Web Services can convert your applications into Web-applications.
·         Web Services are also called as application services.

Web services means a standardized way of integrating Web-based applications using the XMLSOAPWSDL and UDDI open standards over an Internet protocol backbone.
·         XML    (Extensible Markup Language) is used to tag the data.
·         SOAP (Simple Object Access Protocol) is used to transfer the data.
·         WSDL (Web Services Description Language) is used for describing the services available.
·         UDDI  (Universal Description, Discovery and Integration) is used for listing what services are available.

Web services use XML to code and to decode data, and SOAP to transport it (using open protocols).With Web services, your accounting department's Win 2k server's billing system can connect with your IT supplier's UNIX server. It allow organizations to communicate data without knowledge of each other's IT systems( Windows/ UNIX/ etc.) behind the firewall.
Web services share business logic, data and processes through a programmatic interface across a network. Web services do not provide the user with a GUI. Developers can add the Web service to a GUI (such as a Web page or an executable program) to offer specific functionality to users.
The basic Web services platform is XML + HTTP.
XML provides a language which can be used between different platforms and programming languages and still express complex messages and functions.
The HTTP protocol is the most used Internet protocol.
Web services platform elements:
  • SOAP
  • WSDL
  • UDDI
SOAP
SOAP is an XML-based protocol to let applications exchange information over HTTP.
Or more simple: SOAP is a protocol for accessing a Web Service.
  • SOAP stands for Simple Object Access Protocol
  • SOAP is a COMMUNICATION PROTOCOL 
  • SOAP is a FORMAT for sending messages
  • SOAP is designed to communicate via Internet
  • SOAP is platform independent
  • SOAP is language independent
  • SOAP is based on XML
  • SOAP is simple and extensible
  • SOAP allows you to get around firewalls
  • SOAP is a W3C standard
WSDL
WSDL is an XML-based language for locating and describing Web services.
  • WSDL stands for Web Services Description Language
  • WSDL is based on XML
  • WSDL is used to DESCRIBE Web services
  • WSDL is used to LOCATE Web services
  • WSDL is a W3C standard
UDDI
UDDI is a directory service where companies can register and search for Web services.
  • UDDI stands for Universal Description, Discovery and Integration
  • UDDI is a directory for STORING INFORMATION  about web services
  • UDDI is a directory of web service interfaces described by WSDL
  • UDDI communicates via SOAP
  • UDDI is built into the Microsoft .NET platform

Skeleton SOAP Message

<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">

<soap:Header>
...
</soap:Header>

<soap:Body>
...
  <soap:Fault>
  ...
  </soap:Fault>
</soap:Body>

</soap:Envelope>

The WSDL Document Structure

A WSDL document describes a web service using these major elements:
Element
Defines
<types>
The data types used by the web service
<message>
The messages used by the web service
<portType>
The operations performed by the web service
<binding>
The communication protocols used by the web service
The main structure of a WSDL document looks like this:
<definitions>

<types>
  definition of types........
</types>

<message>
  definition of a message....
</message>

<portType>
  definition of a port.......
</portType>

<binding>
  definition of a binding....
</binding>

</definitions>
A WSDL document can also contain other elements, like extension elements, and a service element that makes it possible to group together the definitions of several web services in one single WSDL document.

Uses of Web Services

Reusable application-components.
There are things applications need very often. So why make these over and over again?
Web services can offer application-components like: currency conversion, weather reports, or even language translation as services.
Connect existing software.
Web services can help to solve the interoperability problem by giving different applications a way to link their data.
With Web services you can exchange data between different applications and different platforms.