Web-Based Information Everyday Activity Systems • The Web has primarily been people interacting Fall 2006 with Web applications. CMPUT 410: Web Services • What about applications interacting with Web Applications? Dr. Osmar R. Zaïane • “The Web can grow significantly in power and scope “ The Web can grow significantly in power and scope • if it is extended to support communication between if it is extended to support communication between applications, from one program to another.” ” applications, from one program to another. - From the W3C XML Protocol Working Group Charter University of Alberta Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 1 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 2 Course Content Objectives of Lecture 13 • Introduction • Perl & Cookies Web Services Web Services • Internet and WWW • SGML / XML • Protocols • CORBA & SOAP • HTML and beyond • Web Services • Discuss about a standardized framework for standardized framework for • Animation & WWW • Search Engines applications to communicate over the applications to communicate over the • CGI & HTML Forms • Recommender Syst. internet internet • Javascript • Web Mining • Get a general idea about the models of web • Databases & WWW • Security Issues services • Dynamic Pages • Selected Topics Web Services 3 4 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta
Most Web Application Outline of Lecture 13 Development Today If distributed If distributed Browsers services are services are • Evolution in Web applications App Code needed, needed, Internet implementation • What is this web service paradigm? implementation All services All services details, service details, service need to be need to be deployment, • SOAP Revisited deployment, local to the Local local to the Browsers security issues, security issues, server. Services server. etc., need to be • Models of Web Services etc., need to be and Data understood and understood and apriori agreed • WSDL and UDDI Web app developers took apriori agreed Web app developers took Historically, most upon by client advantage of these local Historically, most upon by client advantage of these local development efforts have services and used HTML to and server. • Scenarios dictated by business logic development efforts have services and used HTML to and server. been directed toward “project” the UI to lots of been directed toward “project” the UI to lots of building apps using rich local clients. building apps using rich local clients. services. services. Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 5 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 6 Future Web Application Motivating Example Development App Code Weather in Edmonton? Temperature in Edmonton? Vertical and Portal Internet Services Edmonton OS and Temperature Internet Local =-10C Services Application Specific Web Services Web Services are building blocks Web Services are building blocks that enable developers to build and App Code App Code -10°C that enable developers to build and aggregate applications and services aggregate applications and services from local and remote resources for Building Block from local and remote resources for a range of clients. Web Services a range of clients. Local Web Web Service Communications Web Service Communications Services Services Edmonton HTML Parsing 1. Message-based (robust and scalable) 1. Message-based (robust and scalable) and Data Temperature Browsers Devices 2. Synchronous & Asyn. communications model 2. Synchronous & Asyn. communications model =-10C 3. XML (easy to specify, modify, & extend) 3. XML (easy to specify, modify, & extend) Temperature in Edmonton? 4. Web protocols (universal access) 4. Web protocols (universal access) 7 8 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta
What are Web Services? Outline of Lecture 13 • Identified by a URI • Interfaces defined using XML • Can be discovered by other systems • Evolution in Web applications • Interact using XML based messages conveyed by • What is this web service paradigm? Internet protocols • SOAP Revisited Source: Web Services Glossary • Models of Web Services • Platform neutral • WSDL and UDDI • Open Standards (Interoperable) • Scenarios dictated by business logic • Based on ubiquitous software – XML Parsers – HTTP Server Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 9 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 10 What are Web Services? Web Service Components • To discover where you can get web services and Application 1 Application 2 what businesses have to offer – UDDI • To describe a web service and how to interact with XML it – WSDL • To package your interaction with the Web Service – SOAP • To carry the data envelope across the internet – HTTP Post • To fragment and deliver the http post request to the end point = TCP/IP 11 12 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta
Transport Layer for Web Publish-Discover-Bind Model Services • HTTP POST is most common Registry • But other protocols such as 1-Publish – FTP 2-Discover – SMTP 3-Bind 1-Bind Web Web Client Client – HTTP GET Client Client Service Service 4-Use 2-Use Client &Web Service Generic Web Service known to each other Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 13 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 14 Web Services Outline of Lecture 13 • Programmatic access to services of Web site • Evolution in Web applications • Allow for rich, dynamic communication • What is this web service paradigm? between applications • SOAP Revisited • Models of Web Services “ Components for the Web ” • WSDL and UDDI • Scenarios dictated by business logic 15 16 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta
Web Services and SOAP What Is SOAP? • A common standard that can be used to describe • Simple Object Access Protocol data that is platform and language neutral – • Lightweight XML-based messaging XML format • A common wire format protocol that is platform and language neutral – SOAP Works with: • A common contract language for describing – Any operating system web services – WSDL – Any programming language – Any platform Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 17 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta 18 Simple SOAP Request What Is A SOAP Message? (Using HTTP) POST /TempService POST / TempService HTTP/1.1 HTTP/1.1 The complete SOAP Message The complete SOAP Message SOAP Message Host: www.weather.com Host: www.weather.com Standard Protocol (HTTP, SMTP, etc.) Standard Protocol (HTTP, SMTP, etc.) Content- Content -Type: text/xml; Type: text/xml; charset charset="utf ="utf- -8 8“ “ Protocol Headers and SOAP Headers and SOAP Headers Content- -Length: 290 Length: 290 Content SOAPAction: Some SOAPAction : Some- -Namespace Namespace- -URI#GetTemperatureRequest URI#GetTemperatureRequest <Envelope> encloses payload Envelope> encloses payload < SOAP Envelope <SQ:Envelope <SQ:Envelope SOAP Header < <Header> encloses headers Header> encloses headers xmlns:SQ="http:// xmlns:SQ ="http://schemas.xmlsoap.org schemas.xmlsoap.org/soap/envelope/" /soap/envelope/" SQ:encodingStyle="http:// SQ:encodingStyle ="http://schemas.xmlsoap.org schemas.xmlsoap.org/soap/encoding/" /soap/encoding/" Headers Individual headers Individual headers > > <SQ:Body> <SQ:Body> <Body> contains SOAP < Body> contains SOAP SOAP Body <m: m:getTemperatureRequest getTemperatureRequest xmlns:m xmlns:m="Some ="Some- -Namespace Namespace- -URI"> URI"> < Message Name and Data Message Name and Data <city>Edmonton</city> <city>Edmonton</city> Message Name & Data XML Encoded SOAP XML Encoded SOAP </m: </ m:getTemperatureRequest getTemperatureRequest> > Message Name and Data Message Name and Data </SQ:Body> </SQ:Body> </SQ:Envelope> </SQ:Envelope> 19 20 Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta Dr. Osmar R. Zaïane, 2001-2006 Web-Based Information Systems University of Alberta
Recommend
More recommend