Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services.

Similar presentations


Presentation on theme: "Web Services."— Presentation transcript:

1 Web Services

2 What are Web Services? Today, we normally use Web browsers to talk to Web sites Browser names document via URL (lots of fun and games can happen here) Request and reply encoded in HTML, using HTTP to issue request to the site 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? 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. Web services are often advertised as a new wave in business process automation 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. Work in progress Unproven Lots of hype?

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

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

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

7 Examples of Web Services
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. The airlines, hotel chains and car rental agencies can be thought of as web services from the travel agent’s perspective. The travel agent’s user may think of the travel agent as a web service.

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

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

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

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

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

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

14 Identifies XML has SOAP message
Soap Request SOAP-ENV:Envelope xmlns:SOAP-ENV=" SOAP-ENV:encodingStyle=" <SOAP-ENV:Body> <m:GetLastTradePriceRequest xmlns:m="Some-URI"> <symbol>HP</symbol> </m:GetLastTradePriceRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Identifies XML has SOAP message

15 Soap Request Get price for HP stock SOAP-ENV:Envelope
xmlns:SOAP-ENV=" SOAP-ENV:encodingStyle=" <SOAP-ENV:Body> <m:GetLastTradePriceRequest xmlns:m="Some-URI"> <symbol>HP</symbol> </m:GetLastTradePriceRequest> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Get price for HP stock

16 SOAP Response <SOAP-ENV:Envelope
xmlns:SOAP-ENV=" SOAP-ENV:encodingStyle=" <SOAP-ENV:Body> <m:GetLastTradePriceResponse xmlns:m="Some-URI"> <Price>34.5</Price> </m:GetLastTradePriceResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

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

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

19 WSDL – An Example Definition of data types Definition of messages
<definitions> <types> <!-- XML Schema --> </types> <message name=“getQuoteRequest” /> <message name=“getQuoteResponse” /> <portType name=“StockQuoteServiceInterface”> <operation name=“getQuote”> <input message=“getQuoteRequest” /> <output message=“getQuoteResponse” /> </operation> </portType> <binding name=“StockQuoteServiceBinding” type=“StockQuoteServiceInterface”> <soap:binding transport=“ /> </binding> <service name=“StockQuoteService”> <port name=“StockQuoteServicePort” binding=“StockQuoteServiceBinding”> <soap:address location=“ /> </port> </service> </definitions> Definition of data types Definition of messages Definition of port type Definition of the bindings Definition of the service

20 UDDI UDDI – Universal Description, Discovery, and Integration
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. Search by business or service type Has a Web Services API for publishing and discovering the existence of Web services A coalition of organizations working together to manage UDDI registries and to further develop the Web Services API for accessing those registries.

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

22 Web Service Example(from SUN)
Suppose that the owner of a chain of coffee houses, called Coffee Break, wants to expand by selling coffee online. 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. 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)
Locate coffee supplier through a UDDI service directory. 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 Now Coffee Break can request price lists from each of the coffee distributors returned by the UDDI Service Directory. 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. 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
Within enterprise Tied to a set of programming languages Procedural Usually bound to a particular transport Tightly-coupled Firewall-unfriendly Efficient processing Web Services Between enterprises Program language independent Message-driven Easily bound to different transports Loosely-coupled Firewall-friendly Relatively not efficient processing

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


Download ppt "Web Services."

Similar presentations


Ads by Google