🎧 New: AI-Generated Podcasts Turn your study notes into engaging audio conversations. Learn more

COURSE 5 Web Services.pdf

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Transcript

Web and mobile system Course 5: Web service notion Professor Okba Kazar Email: [email protected]/[email protected] Outline  Web Services       What Why How Who When Not New Age of Distributed Computing  Convergence of two technologies  The Web:    Universal communication...

Web and mobile system Course 5: Web service notion Professor Okba Kazar Email: [email protected]/[email protected] Outline  Web Services       What Why How Who When Not New Age of Distributed Computing  Convergence of two technologies  The Web:    Universal communication HTTP, XML Service-oriented computing:   Exposing data and business logic through a programmable interface EJB(Enterprise Java Bean), RPC(Remote Procedure Call), RMI(Remote Method Invocation), CORBA, DCOM What is SOA?  Contemporary Service-Oriented Architectures (SOA) represents an architecture that promotes service-orientation through the use of Web services.  All functions, or services, are defined using a description language and have invokable interface that are called to perform business processes. SOA Communication Overview   Communication via existing Internet Protocols and XML Simple Object Access Protocol (SOAP) SOAP What are Web Services?  W3C 2003:   “A Web service is : a software system designed to support interoperable machine-to-machine interaction over a network.  It has an interface described in a machine-processable format (specifically WSDL).  Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.” Web Service      Service available over the web Enables communication between application over the web Provides a standard protocol/ format for communication Plateform independent communication Using web services two different application(implementation)can talk to each other and exchange data/information Basic Architectures: Servlets/CGI and Web Services Browser GUI Client Browser HTTP GET/POST Web Server WSDL SOAP SOAP Web Server WSDL Web Server WSDL WSDL JDBC JDBC DB or MPI Appl. DB or MPI Appl. Explanation of Previous Slide  The diagram on the left represents a standard web application.     Browsers converse with web servers using HTTP GET/POST methods. Servlets or CGI scripts process the parameters and take action, like connect to a DB. Examples: Google, Amazon On the right, we have a Web services system.   Interactions may be either through the browser or through a desktop client (Java Swing, Python, Windows, etc.) Examples: Google, Amazon Amazon and Google Experiment with Web Services  Both Google and Amazon have conducted open experiments with Web services.  Why? To allow partners to develop custom user interfaces and applications that work Google and Amazon data and services.  You can download their APIs and try them.   http://www.google.com/apis/ http://www.amazon.com/webservices Why Web Services? Observations www.ws-i.org  The industry is aligned …  Broad industry initiative for Web services   Over 150 industry leaders Interoperability across platforms, applications, and languages Why Web Services? Observations Web Services: Life Cycle Service Registry (e.g., IBM UDDI service)  publish service (e.g., stock quote) Service Provider (e.g., Brokerage House)  find service  bind to service Service Requester (e.g., XYZ Financial Software) Life Cycle of a Web Service Execution (Registry, Lookup, and Consumption) Continue….. Continue….. Continue….. Continue….. Protocols of web service Component of web services(WSDL and UDDI) Continue….. Continue….. Continue….. Continue….. Why Web Services?     Interoperable Easy to use Reusable Ubiquitous 1st Generation Web Applications UI Logic Biz Logic Browsers OS Services Servers Data, Hosts 2nd Generation Web Applications Rich Client UI Logic Richer Browsers Biz Logic Tier OS Services Servers Data, Hosts Next Generation Web Applications Other Services Smarter Clients Standard Browsers Smarter Devices Applications Become Programmable Web Services Biz Biz Logic & Web Service Tier Logic OS OS Services Open Internet Communications Protocols (HTTP, SMTP, XML, SOAP) Public Web Services Foundation Services Internal Web Services Servers Data, Hosts What is Under the Hood?     XML SOAP WSDL UDDI Web Services: SOAP, WSDL, UDDI An Overview of SOAP     Simple Object Access Protocol Lightweight XML-based messaging format Builds on  W3C XML standards Works with:    Any operating system Any programming language Any platform What is a SOAP Message? SOAP Message The complete SOAP Message Protocol Headers Standard Protocol (HTTP, SMTP, etc.) and SOAP Headers SOAP Envelope <Envelope> encloses payload SOAP Header Headers SOAP Body Message Name & Data <Header> encloses headers Individual headers <Body> contains SOAP Message Name and Data XML Encoded SOAP Message Name and Data Simple SOAP Request (Using HTTP) POST /StockQuote HTTP/1.1 Host: www.stockquoteserver.com Content-Type: text/xml Content-Length: 323 SOAPAction: “www.stockquoteserver.com/GetLastTradePrice” <?xml version=“1.0” encoding=“utf-8”?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-Namespace-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Simple SOAP Response (Using HTTP) HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: nnnn <?xml version=“1.0” encoding=“utf-8”?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePriceResponse xmlns:m="Some-Namespace-URI"> <Price>24.5</Price> </m:GetLastTradePriceResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> WSDL   Web Services Description Language Lets Web Services describe    what they are where they can be found how they should be used Simplified WSDL example <?xml version="1.0"?> <serviceDescription> <soap > <service> <addresses> <address uri="http://localhost//HelloWorld.asmx"/> </addresses> <requestResponse name="HelloWorld" soapAction="http://tempuri.org/HelloWorld"> <request ref="s0:HelloWorld"/> <response ref="s0:HelloWorldResult"/> </requestResponse> </service> </soap> </serviceDescription> Complete one: ISU Hello in Foreign Language Translator UDDI   Universal Description, Discovery, and Integration Lets companies find publicly available Web Services on the Internet or corporate Intranets. How useful are Web Services?  Web services: Some possibilities        Financial information (e.g., stock quotes) Sports information Weather information News Delivery status Tax and shipping calculations Any data that is relevant to the client Web Services: Who?  Who is doing this?  Vendors    Users/Consumers    Microsoft, IBM, Sun, Oracle, HP, BEA, etc. .NET passport, Calendar, Alerts, Amazon Web Services, etc. Nordstrom, General Motors, etc. List of public Web Services http://www.xmethods.net/ Who should pay attention to this?  All of us! Web Services: When?  Web Services will enter most organizations in three distinct phases: [Source: IDC]  2002 (within the firewall)    2004 (contained external users)     Simplified app integration Increased developer productivity Simplified business-partner connectivity Richer app functionality Subscription-based services 2006 to 2008 (fully dynamic search and use)     Casual / ad-hoc use of services New business models possible Commoditization of software Pervasive use in nontraditional devices References    Clarke, N., “.Net & the J2EE: Web Services - Can we live together?,” JavaOne 2002. Gosling, J., Next-Generation Web Services Conference, Keynote address, Jan, 2002. Gusmano, M., “Build Web Services with VB.NET,” Microsoft Internet Developer Group, April 2001.

Tags

web services distributed computing
Use Quizgecko on...
Browser
Browser