11-09-2013, 03:46 PM
Introduction to Web Services
Web Services.ppt (Size: 1.14 MB / Downloads: 191)
Motivation
The ability to program the Web.
Example: Consider an Excel spreadsheet that summarizes your whole financial picture : stocks, bank accounts, loans, etc. If some of this information is available through XML Web services, Excel can update it and present the update information to the user.
History
Web services evolved from previous technologies that served the same purpose such as RPC, ORPC (DCOM, CORBA and JAVA RMI).
Web Services were intended to solve three main problems:
Interoperability
Firewall traversal
Complexity
Interoperability
Earlier distributed systems suffered from interoperability issues because each vendor implemented its own on-wire format for distributed object messaging.
Development of DCOM apps strictly bound to Windows Operating system.
Development of RMI bound to Java programming language.
Firewall traversal
Collaboration across corporations was an issue because distributed systems such as CORBA and DCOM used non-standard ports.
Web Services use HTTP as a transport protocol and most of the firewalls allow access though port 80 (HTTP), leading to easier and dynamic collaboration.
Web Services Components
XML – eXtensible Markup Language – A uniform data representation and exchange mechanism.
SOAP – Simple Object Access Protocol – A standard way for communication.
UDDI – Universal Description, Discovery and Integration specification – A mechanism to register and locate WS based application.
WSDL – Web Services Description Language – A standard meta language to described the services offered.
Example – A simple Web Service
A buyer (which might be a simple client) is ordering goods from a seller service.
The buyer finds the seller service by searching the UDDI directory.
The seller service is a Web Service whose interface is defined using Web Services Description Language (WSDL).
The buyer is invoking the order method on the seller service using Simple Object Access Protocol (SOAP) and the WSDL definition for the seller service.
The buyer knows what to expect in the SOAP reply message because this is defined in the WSDL definition for the seller service.
SOAP
SOAP originally stood for "Simple Object Access Protocol" .
Web Services expose useful functionality to Web users through a standard Web protocol called SOAP.
Soap is an XML vocabulary standard to enable programs on separate computers to interact across any network. SOAP is a simple markup language for describing messages between applications.
Soap uses mainly HTTP as a transport protocol. That is, HTTP message contains a SOAP message as its payload section.
SOAP Building Blocks
A SOAP message is an ordinary XML document containing the following elements:
A required Envelope element that identifies the XML document as a SOAP message.
An optional Header element that contains header information.
A required Body element that contains call and response information.
An optional Fault element that provides information about errors that occurred while processing the message.
The WSDL Document Structure
A WSDL document is just a simple XML document.
It defines a web service using these major elements:
port type - The operations performed by the web service.
message - The messages used by the web service.
types - The data types used by the web service.
binding - The communication protocols used by the web service.