Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services. What are Web Services? r Today, we normally use Web browsers to talk to Web sites m Browser names document via URL (lots of fun and games.

Similar presentations


Presentation on theme: "Web Services. What are Web Services? r Today, we normally use Web browsers to talk to Web sites m Browser names document via URL (lots of fun and games."— Presentation transcript:

1 Web Services

2 What are Web Services? r Today, we normally use Web browsers to talk to Web sites m Browser names document via URL (lots of fun and games can happen here) m Request and reply encoded in HTML, using HTTP to issue request to the site r Web Services generalize this model so that computers can talk to computers using much of the same protocols used to communicate between browsers and web servers + a lot more.

3 What are Web Services? r The concept of Web Service (WS) was introduced in 1999 by Hewlett-Packard. Microsoft coined the actual term “Web Services” in June 2000 as part of the.NET initiative. r Web services are often advertised as a new wave in business process automation m Is suppose to allow a seamless integration of systems and applications that communicate over the network and share data. This technology is in its infancy. r Work in progress m Unproven m Lots of hype?

4 What are Web Services? r Idea of treating software as a service. m Nothing new r Evolution of many different technologies m Remote Procedure Calls (RPC) m CORBA m DCOM m Java RMI r What is novel? m Overwhelming industry support m Utilization of XML

5 Why Web Services r SUN RPC, DEC, CORBA, DCOM, Java RMI m Not considered Internet-friendly m Interoperability issues: standards are not always clear. m Cannot be implemented in any language on any platform m Software components that comprise the application are often not useful except for that application r A web service m Can be implemented in any language on any platform m Black boxes Component-like, reusable m Based on Web standards HTTP, XML, SOAP, WSDL, UDDI

6 Examples of Simple Web Services r Return the distance in miles between 2 locations r Locate entertainment, restaurants and lodging in a given area r Return the name and the postal address associated with a given phone number. r Find ATM location for a given postal code. r Return stock quotes.

7 Examples of Web Services r A travel agent needs to book a flight, hotel and car in a warm place. The client wants the best prices. Travel agent contacts each airline for flight information, hotel chain for hotel information and car rental agencies. m The airlines, hotel chains and car rental agencies can be thought of as web services from the travel agent’s perspective. m The travel agent’s user may think of the travel agent as a web service.

8 Examples of Web Services r You should note the potential reusability of each of the services described on the last two slides. r Web services provide interoperability between various software applications running on various platforms. r Web services leverage open standards and protocols.

9 Web Services Architecture (1) Publish Service Directory Service Provider Service Requestor (2) Discover Services (3) Invoke Services

10 Web Services Architecture r Service Provider m Implements the Web Service and makes it available on the Internet r Service Requestor m Consumer of the Web Service r Service Directory m Logically centralized directory of services m Place to publish a new web service or find existing one.

11 XML r XML – Extensible Markup Language r Open standard for data exchange; for describing data which allows an infinite range of elements (tags) to be defined: m Tags define content m Separation of content from presentation

12 SOAP r SOAP – Simple Object Access Protocol m Created by Microsoft and submitted to W3C in 1999 m Multivendor support including IBM, Sun, Oracle, HP, etc; r SOAP operates as RPC mechanism with HTTP used as transport protocol. r Encodes requests and responses as XML documents. r SOAP is suppose to be simple, easy to extend and interoperable.

13 SOAP Elements r Envelope (mandatory) m Top element of the XML document representing the message r Header (optional) m Determines how a recipient of a SOAP message should process the message m Adds features to the SOAP message such as authentication, transaction management, payment, message routes, logging, auditing, etc… r Body (mandatory) m Exchanges information intended for the recipient of the message. m Typical use is for RPC calls and error reporting.

14 Soap Request SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP- ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> HP Identifies XML has SOAP message

15 Soap Request SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP- ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/ > HP Get price for HP stock

16 SOAP Response 34.5

17 WSDL r WSDL – Web Services Description Language r Type of XML used to describe abilities of Web Service to its potential user. r WSLD provides the standard method of describing web services and their specific capabilities to other applications.

18 Elements in WSDL Definitions r Types m Based on XML Schema type system r Message formats m Parts represent method parameters r Port Types m Set of operations m Parameter order m Input and output messages r Bindings m Map a Port Type to a specific protocol, using a specific data encoding style r Services m Set of ports that implement port types m Access point for each port

19 … WSDL – An Example Definition of data types Definition of messages Definition of port type Definition of the bindings Definition of the service

20 UDDI r UDDI – Universal Description, Discovery, and Integration r Enables the creation of searchable web service directory that allows for the registration of a service and in response to a user provide the location of a service. r Search by business or service type r Has a Web Services API for publishing and discovering the existence of Web services r A coalition of organizations working together to manage UDDI registries and to further develop the Web Services API for accessing those registries.

21 How UDDI Works UDDI Business Registry 3.3. Assigns a unique identifier to each business registration Marketplaces, search engines, and business apps query the registry to discover services at other companies 4.4. SW companies, standards bodies, and programmers populate the registry with descriptions of different types of services 1.1. Business Registrations 2.2. Businesses populate the registry with descriptions of the services they support Business uses this data to facilitate easier integration with each other over the Web 5.5.

22 Web Service Example(from SUN) r Suppose that the owner of a chain of coffee houses, called Coffee Break, wants to expand by selling coffee online. r The owner instructs the business manger to find some new coffee supplier, get their wholesale prices, and then arrange for orders to be placed as the need arises. r Coffee Break can analyze prices and decide which new coffees it wants to carry and which companies it wants to buy them from.

23 Web Services Example (from SUN) r Locate coffee supplier through a UDDI service directory. r The Coffee Break will issue a query to the UDDI service directory. When the search is completed, the registry will send back information on how to contact the wholesale coffee distributors that meet the criteria set out in the query.

24 Web Services Example r Now Coffee Break can request price lists from each of the coffee distributors returned by the UDDI Service Directory. m The Coffee Break has obtained a WSDL description for each distributor which describes the procedure to call to get prices and the URL where the request is to be sent. r Upon receiving the responses for the request for prices, Coffee Break processes the price lists. This is used to send orders.

25 Traditional RPC vs Web Services Traditional RPC r Within enterprise r Tied to a set of programming languages r Procedural r Usually bound to a particular transport r Tightly-coupled r Firewall-unfriendly r Efficient processing Web Services r Between enterprises r Program language independent r Message-driven r Easily bound to different transports r Loosely-coupled r Firewall-friendly r Relatively not efficient processing

26 Challenges r Standards are new and require further development as to make sure that there is true interoperability. r Lack of Security r Controversy over royalty fees (intellectual property rights to SOAP, WSDL, UDDI are held by Microsoft and IBM). r Management, monitoring, auditing r Performance: WS may be too slow for high performance applications since parsing XML takes time. r Quality of Service: Lack of standards describing quality of various web services.


Download ppt "Web Services. What are Web Services? r Today, we normally use Web browsers to talk to Web sites m Browser names document via URL (lots of fun and games."

Similar presentations


Ads by Google