Web services: an Introduction Stuart Fitz-Gerald Feb 2005
Web services - Stuart Fitz-Gerald2 Overview Introducing Web services The human-centric Web The application-centric Web The semantic Web
Web services - Stuart Fitz-Gerald3 Web services definition “A Web service is any service that is available over the Internet, uses a standardised XML messaging system, and is not tied to any operating system or programming language.” Ethan Cerami (2002)
Web services - Stuart Fitz-Gerald4 A Simple View
Web services - Stuart Fitz-Gerald5 Alternatives for XML messaging There are several alternatives for XML messaging: 1.XML-RPC (Remote procedure calls) 2.SOAP 3.HTTP GET/POST
Web services - Stuart Fitz-Gerald6 Alternatives for XML messaging
Web services - Stuart Fitz-Gerald7 Additional desirable properties A Web service should be self- describing A Web service should be discoverable
Web services - Stuart Fitz-Gerald8 Self-Describing If you publish a new Web service you should also publish an public interface to it. At a minimum, your service should include human-readable documentation that other developers can easily integrate into your service.
Web services - Stuart Fitz-Gerald9 Discoverable If you create a Web service, there should be a relatively simple mechanism for you to publish this fact. Likewise, there should be some simple mechanism whereby interested parties can find the service and locate its public interface.
Web services - Stuart Fitz-Gerald10 A Complete Web service Any service that: Is available over the Internet or private (intranet) networks Uses a standardised XMLmessaging system Is not tied to any one operating system Is self-describing via a common XML grammar Is discoverable via a simple find mechanism
Web services - Stuart Fitz-Gerald11 The Web Today: human centric
Web services - Stuart Fitz-Gerald12 The Web Today: human centric The model illustrated on the previous slide illustrates the human-centric Web. In this humans are the principal actors initiating most Web requests. It also represents the primary model on which most of the Web operates today.
Web services - Stuart Fitz-Gerald13 Web services: application centric With Web services we move from a human-centric Web to an application- centric Web. This does not mean that humans are entirely out of the picture. It just means that conversations can take directly between applications just as easily as browsers and servers.
Web services - Stuart Fitz-Gerald14 Web services: Examples Examples of use: Credit card verification Package tracking Shopping bots Currency conversion Language translation
Web services - Stuart Fitz-Gerald15 Web services and the Semantic Web Tim Berners-Lee has argued for a Semantic Web. The Semantic Web vision is application-centric and shares many of the same ideas as Web services. In fact TBL views Web services as the actualisation of the Semantic Web vision.
Web services - Stuart Fitz-Gerald16 The Automated Web An application-centric Web is not a new notion. For years developers have created CGI programs and Java servlets primarily for use by other applications eg Credit card services Search systems News retrieval systems Problem? Most have been ad hoc solutions.
Web services - Stuart Fitz-Gerald17 The Automated Web Web services offer the promise of some standardisation “The Web services architecture provides an interesting alternative for drastically decoupling presentation from content. For example a site could consist of nothing but container pages that pass parameters to the real logic via SOAP or XML-RPC. This makes it easy to change presentation and also lets humans and computers share a single Web service.”
Web services - Stuart Fitz-Gerald18 The Automated Web Consider the following example of a firm called ME wanting to buy product from Widgets, Inc. ME wants to integrate order status into an integrated inventory system. Here is the possible process: 1.The inventory application wakes up and connects to a centralised directory of Web services. The directory returns information on Widgets, Inc service and includes a pointer to the service description. 2.The inventory application connects to Widgets, Inc and retrieves the service description. 3.The description file includes complete details about how to connect to the specified service. The inventory application can automatically invoke the order status service.
Web services - Stuart Fitz-Gerald19 The Automated Web Can this be fully automated using current Web services technology? Not quite. It is possible to create Java programs to query service registeries. Understanding the results still requires human intervention. There is currently mechanism for automating business relationships. Current Web services take us a step closer.
Web services - Stuart Fitz-Gerald20 The Automated Web
Web services - Stuart Fitz-Gerald21 Web service roles There are three major roles within the Web services architecture: Service provider - The service provider implements the service and makes it available on the Internet Service requester - This is any consumer of the Web service. The requestor utilises an existing Web service by issuing an XML request Service registry - This is a logically centralised directory of services. The regsitry provides a central place where developers can publish new services and find existing ones.
Web services - Stuart Fitz-Gerald22 Web service roles
Web services - Stuart Fitz-Gerald23 Web service protocol stack The protocol stack currently has four layers: 1.Service transport - this layer is responsible for transporting messages between applications. This includes HTTP, SMTP, FTP and BEEP (Blocks Extensible Exchange Protocol). 2.XML messaging - responsible for encoding messages. This includes XMPL-RPC and SOAP 3.Service Description - this is responsible for the public interface. Currently this falls WSDL. 4.Service Discovery - this layer is responsible for centralising services into a common registry and allows easy find. This falls to UDDI (Universal Discovery, Description and Integration)
Web services - Stuart Fitz-Gerald24 Web services protocol stack
Web services - Stuart Fitz-Gerald25 XML Messaging When developers decided to build a Web service they chose XML given the vast array of XML tools, including parsers and editors for nearly every operating system and programming language this was a natural choice. There are two main contenders for XML messaging: XML-RPC SOAP
Web services - Stuart Fitz-Gerald26 XML Messaging XML-RPC is a simple protocol that uses XML messages to perform RPCs. Requests are encoded in XML and sent via HTTP POST. XML responses are embedded in the body of the HTTP response. Because XML-RPC is platform independent, it allows diverse applications to communicate For example a Java client can speak XML-RPC to a Perl server.
Web services - Stuart Fitz-Gerald27 XML-RPC request weather.getWeather 10016
Web services - Stuart Fitz-Gerald28 XML-RPC response 65
Web services - Stuart Fitz-Gerald29 SOAP SOAP is an XML based protocol for exchanging information between computers. Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the main focus of SOAP is RPCs transported via HTTP. Like XML-RPC, SOAP is platform-independent and therefore enables diverse applications to communicate.
Web services - Stuart Fitz-Gerald30 SOAP Request ?xml version='1.0' encoding='UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <ns1:getWeather xmlns:ns1="urn:examples:weatherservice" SOAP-ENV:encodingStyle="
Web services - Stuart Fitz-Gerald31 SOAP Response <SOAP-ENV:Envelope xmlns:SOAP-ENV=" xmlns:xsi=" xmlns:xsd=" <ns1:getWeatherResponse xmlns:ns1="urn:examples:weatherservice" SOAP-ENV:encodingStyle=" 65
Web services - Stuart Fitz-Gerald32 Web Service Description Language WSDL currently represents the service description within the Web service protocol stack. WSDL is an XML grammar for specifying a public interface to the Web service. This public face can include information on all publicly available functions, data type information for all XML messages, binding information about the specific protocol to be used and address information for locating the specified service. WSDL is not tied to a specific XML messaging system, but it does include built-in extensions for describing SOAP services.
Web services - Stuart Fitz-Gerald33 UDDI UDDI currently represents the discovery layer within the Web services protocol stack. Originally created by Microsoft, IBM and ARIBA. It represents a technical specification for publishing and finding businesses and Web services Principal categories for data: White pages - general company specific information Yellow pages - general classification data eg product code, industry code or geographic code. Green pages - technical information about a Web service.
Web services - Stuart Fitz-Gerald34 Web Services The excitement over Web services is based largely on the potential for a combination of XML, the Web, the SOAP and WSDL specifications, and to-be- defined protocol stacks to address many of the problems these technologies have encountered. For example, distributed object systems such as Microsoft's COM family and the OMG CORBA standard did not interoperate, each presented numerous security and administration challenges when deployed over the internet, and neither quite meet the scalability expectations created by the Web. Various XML-based B2B systems have showed much potential, but created incompatible protocols on top of the internet standards which lead to interoperability problems. The Web has proven enormously popular, scalable, and interoperable, but it too presents many challenges -- reliability, security, database-level transactions, details of how to map platform-neutral data, URIs and HTTP operations to back-end application systems, and many others -- that must be handled by Web applications rather than some standardized infrastructure. Quote from: W3C Web Services Architecture Document
Web services - Stuart Fitz-Gerald35 For next time: We will consider: Wikis, Web logs and VOIP (Dave Martland two sessions); then from 8th March 2005, The mechanism role of Web Services.