Download presentation
Presentation is loading. Please wait.
1
Introduction to Web Services
By Karim Zaveri
2
What is a Web Service Method of communication that allows software systems to exchange data over the Internet W3C defines a Web service as “a software system designed to support interoperable machine-to-machine interaction over a network” Based on Web based standard protocols: XML and HTTP Operating System, Platform, and Language independent
3
History Need for a standard way for businesses to communicate over a network Many past attempts for standard communication protocol failed, e.g. EDI, CORBA, DCOM Complex and difficult to implement, costly and inflexible HTTP and XML Web standards paved way for standardized M2M communication XML-RPC was first attempt by Microsoft. Predecessor to SOAP Simple Object Access protocol (SOAP) designed in 1988 by Dave Winer, Don Box, Bob Atkinson, and Mohsen Al-Ghosein for Microsoft SOAP was platform agnostic, flexible, and general-purpose
4
History (cont’d) IBM was first to accept SOAP and work with Microsoft (2000). They worked together to come up with WSDL Need for global registry to advertise and locate Web services IBM, Microsoft, and Ariba developed UDDL (Universal Description, Discovery, and Integration) Oracle, HP, Sun, IBM, and Microsoft accepted SOAP, WSDL, UDDL as a de-facto standard for Web Services (2000) SOAP 1.2 became a W3C recommendation on June 24, 2003 WSDL 2.0 became a W3C recommendation on June 2007
5
Benefits of using Web Services
Interoperability: seamless communication and exchange of data between various systems. Platform, system, and language independent. Loosely coupled Usability: accessibility of Web Services from other businesses Reusability: ease of reusability of previously developed Web Services Deployability: deployed over standard Internet technologies, messages can easily pass through firewalls
6
Web Service Components
Service Provider – the software system that would process the request and provide the data to the requestor Service Requestor – the software system that requests data by calling a service Service Registry – Also known as UDDI (Universal Description, Discovery and Integration) a directory or registry identifying software systems and the services they provide
7
UDDI (Universal Description, Discovery, and Integration
Mechanism to register and locate web service applications Sponsored by the Organization for the Advancement of Structured Information Standards (OASIS) Originally proposed as a core Web service standard Uses WSDL to describe interfaces to web services Helps with the “discovery” of web services by various business service providers Not as widely adopted as its designers had hoped
8
SOAP (Simple Object Access protocol)
Protocol specification for web service data exchange Foundation layer for web service protocol stack Uses XML for message format Easily extensible, e.g. WS-Security, WS-Routing Can operate under any transport protocol, e.g. HTTP, UDP. Popular transport protocol is HTTP Language and platform independent
9
SOAP Elements Envelope: Identifies the XML document as a SOAP message
Header: Contains header information Body Message data: Contains call and response information Fault (optional): Provides information about errors that occurred while processing the message
10
SOAP Example - Request <?xml version="1.0"?> <soap:Envelope xmlns:soap=" soap:encodingStyle=" <soap:Body xmlns:m=" <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
11
SOAP Example - Response
<?xml version="1.0"?> <soap:Envelope xmlns:soap=" soap:encodingStyle=" <soap:Body xmlns:m=" <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
12
WSDL Web Services Description Language XML based language
Describes Service Providers Web Service Operations Serves as a contract between service provider and service requester Describes the services, how to call them, communication protocol to use, and the resultant data
13
WSDL structure Cristcost, Comparison and analogies between WSDL 1.1 and 2.0 structures. [Image]. Retrieved from
14
Web Services Process Basic architecture of the Web services framework. [Image]. Retrieved from
15
Classes of Web Services
2 Major classes of web services Big Web Services RESTful Web Services
16
Big Web Services Uses XML messages Based on SOAP standard
Often reference WSDL to describe the web services offered Popular with traditional enterprise systems Includes architecture to handle complex requirements like security, transactions, addressing, trust, and coordination. Useful for solutions that require Asynchronous processing and stateful operations
17
RESTful Web Services REpresentational State Transfer (REST) is an architectural style – neither a standard nor a protocol Manipulates XML representations of web resources using uniform set of stateless operations Representation of web resources are identified by URI (Uniform Resource Identifier) Based on HTTP protocol and its methods (GET, PUT, POST, DELETE) Does NOT use WSDL – both parties require mutual understanding of the data being exchanged Useful for solutions that are completely stateless and requiring lightweight infrastructure (less bandwidth usage)
18
JSON-RPC A simple stateless Remote Procedure Call (RPC) protocol that uses JSON formatted messages. A very simple protocol similar to XML-RPC (predecessor to SOAP) JSON (JavaScript Object Notation) is a language-independent data format derived from JavaScript scripting language JSON is a human-readable open-standard format, used as an alternative to XML, Useful for real-time server-to-browser communication Supports multiple web service calls that maybe answered out of order Requests are send through HTTP or a TCP/IP socket Allows sending of notifications (server does not require sending a response back)
19
Web Service specifications
Variety of specifications of varying degrees supported by various standard bodies and entities Specifications may complement, overlap, and compete with each other Extensions to standardized specifications like SOAP, WSDL, UDDI, etc. WS- is the prefix used to indicate specifications associated with Web Services Messaging specifications: WS-Notification, WS-Addressing, WS-Transfer Metadata Exchange specifications: WS-Policy, WS-Discovery Security Specifications: WS-Security, WS-Trust
20
References From EDI To XML And UDDI: A Brief History Of Web Services
Wikipedia WSDL page Wikipedia SOAP page An Introduction to the Web Services Architecture and Its Specifications Types of Web Services – Big and RESTful W3C WSDL 1.1
21
THE END
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.