140 likes | 244 Views
Web Services. Source: George Colouris , Jean Dollimore , Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts & Design (5 th Ed.). Essex: Addison-Wesley This Presentation was adapted from: www.andrew.cmu.edu/course/95-702/slides/WebServices.ppt
E N D
Web Services Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts & Design (5th Ed.). Essex: Addison-Wesley This Presentation was adapted from: www.andrew.cmu.edu/course/95-702/slides/WebServices.ppt www.scs.ryerson.ca/~aabhari/DS-CH19.ppt
Introduction • A web service provides a service interface enabling clients to interact with servers in a more general way than web browsers do. • Clients access the operations in the interface of a web service by means of requests and replies formatted in XML and usually transmitted over HTTP.
Introduction • Web services provide an infrastructure for maintaining a richer and more structured form of interoperability between clients and servers. • They provide a basis whereby a client program in one organization may interact with a server in another organization without human supervision. • External data representation and marshalling of messages exchanged between clients and web services is done in XML.
Web Services • A web service interface generally consists of a collection of operations that can be used by a client over the Internet. • The operations in a web service may be provided by a variety of different resources, for example, programs, objects, databases. • A web service may either be managed by a web server along with web pages; or it may be a totally separate service.
Web Services • Many well-known commercial web services including Amazon, Yahoo, Google and eBay offer web service interfaces that allow client to manipulate their web resources. • As an example, the web service offered by Amazon.com provides operations to allow clients to get information about products, to add an item to a shopping cart or to check the status of a transaction.
Web Services • The Amazon web services may be accessed either by SOAP or by REST (REpresentaional State Transfer). • The provision of a service interface allows its operations to be combined with those of other services to provide new functionality.
Web Services • A major task of many middleware platforms is to protect the programmer from the details of data representation and marshalling and sometimes with making remote invocations look like local ones. • These things are provided as a part of an infrastructure or middleware platform for web services. • At the simplest level, clients and servers may read and write their messages directly in SOAP, using XML.
Web Services • SOAP is defined to enable both client-server and asynchronous interaction over the Internet. • It defines a scheme for using XML to represent the contents of request and reply messages as well as a scheme for the communication of documents. • Originally, SOAP was based on HTTP, but the current version is designed to use a variety of transport protocols including SMTP, TCP or UDP.
Web Services • A SOAP message is carried in an “envelope”. • Inside the envelope there is an optional header and a body
Architecture of Web Services • Components and operations A Web service needs to be created, and its interfaces and invocation methods must be defined. A Web service needs to be published to one or more intranet or Internet repositories for potential users to locate. A Web service needs to be located to be invoked by potential users. A Web service needs to be invoked to be of any benefit. A Web service may need to be unpublished when it is no longer available or needed. Source: IBM
Examples of Web Services • Service Registry/Broker/Directory • http://www.service-repository.com/ • http://www.wsindex.org/ • http://www.programmableweb.com/apis/directory • http://free-web-services.com/ • http://www.xmethods.net/ve2/index.po
Quick Tutorial • http://www.w3schools.com/webservices/default.asp