Presentation is loading. Please wait.

Presentation is loading. Please wait.

Web Services CO5027.

Similar presentations


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

1 Web Services CO5027

2 What are Web Services “a software system designed to support interoperable machine-to-machine interaction over a network “ [W3C] Software component which runs on a remote server providing a defined set of functions for incorporation into a local system Published resources which can be used by external clients or servers.

3 Why Web Services? “Web services provide a standard means of interoperating between different software applications, running on a variety of platforms and/or frameworks” [W3C] eCommerce and eBusiness rely on intercommunication between clients and business. Web services make business processes and services available without need for shipping complex application software or having complex transaction based website.

4 Terminology Services and agents
The service is the abstract definition of the nature and functions that are expected of the web service. The agent is the actual software component which provides the service Requesters and providers Provider entity is the owner of the web service which is made available as the providers agent. Requester entity is the end user of the web service made possible using the requesters agent. Semantics The unambiguous definition of the expected behaviour of the web service

5 How?

6 UDDI Universal Discovery, Description and Integration
“UDDI creates a standard interoperable platform that enables companies and applications to quickly, easily, and dynamically find and use Web services over the Internet. “ [Oasis-IDDI] Allows requester entity to find and incorporate an appropriate web service in their application. Uses XML to communicate.

7 Web service repositories
Online web interface to find web services Some will provide UDDI interface Some use UDDI to build their site Most provide facility to test the web service All provide WSDL

8 WSDL Web Service Description Language
Provides all the information needed to allow an external system to use a system. Similar to the class definition in programming terms. Web tools can use the WSDL spec for a service to provide the interface to the service. Communicates using XML

9 SOAP Simple Object Access Protocol
Message protocol allowing programs from one system to communicate with programs on another system. Uses XML as communication medium.

10 Example SOAP request POST /CurrencyConvertor.asmx HTTP/1.1 Host: Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:Body> <ConversionRate xmlns=" <FromCurrency>GBP</FromCurrency> <ToCurrency>EUR</ToCurrency> </ConversionRate> </soap:Body> </ soap:Envelope>

11 Example SOAP Response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:Body> <ConversionRateResponse xmlns=" <ConversionRateResult>1.4732</ConversionRateResult> </ConversionRateResponse> </soap:Body> </soap:Envelope>

12 Using a Web service Find your web service
Retrieve the WSDL specification for the Web Service Use the specification to produce an interface to the service. Start using the service

13 Type of access to a web service
HTTP GET or POST Uses simple xhtml form to interface with service Service returns xml which will not be in a form suitable for direct display Only works for simple data types SOAP specification Consumer must use correct protocol to access service. Usually requires program to interface.

14 e.g. Language Translation
Web service is: Accessing this page returns a generic page describing the service and how to use it, with a link to a detailed description. Details shows SOAP, HTTP GET & POST are all available. To retrieve WSDL specification append the suffix '?wsdl' to the URL.

15 Simple HTTP GET interface
See translate.html

16 Using the SOAP binding. Use tool to import WSDL and create a proxy class. Use .NET page to call the functions in the proxy class. The proxy calls the real web service and passes back the reply to your page.

17 Examples Language Translator Currency Converter Global Weather
Lotto number chooser Google

18 Language Translator

19 Currency Converter

20 Global weather

21 Lotto number chooser

22 Google

23 Subscription based web services
Michelin route mapping (ViaMichelin) Route planning and mapping Amazon Simple Storage Service (Amazon S3) Internet storage with several web interfaces (incl. Web service) 15c /month stored, 20c/month transfer Amazon Elastic Compute Cloud Dynamic virtual machine service based on Amazon S3 for storage of virtual machines Fees for storage of VMs and fees for running time.


Download ppt "Web Services CO5027."

Similar presentations


Ads by Google