web services
DESCRIPTION
Web Services. Jose Gomez Zaballa CSCI-6314. Today’s Overview. Background WS Concepts Example Assignment. Background. Client / Server Web Scraping Reusability Interoperability. Service Oriented Architecture. Web Services. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/1.jpg)
WEB SERVICES
Jose Gomez ZaballaCSCI-6314
![Page 2: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/2.jpg)
Today’s Overview
• Background• WS Concepts• Example• Assignment
![Page 3: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/3.jpg)
Background• Client / Server • Web Scraping• Reusability• Interoperability
![Page 4: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/4.jpg)
Service Oriented Architecture
![Page 5: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/5.jpg)
Web Services“Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes...Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service.” *
“An application that provides a Web API”**
*From www.xml.com page
![Page 6: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/6.jpg)
Web Services• Are application components• Communicate using open protocols• Self-contained and self-describing• Can be discovered using UDDI• Can be used by other applications• HTTP and XML is the basis
![Page 7: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/7.jpg)
Web Services• Self-contained. On the client side, no
additional software is required.• Self-describing. The definition of the
message format travels with the message• Modular. Simple WS can be aggregated to
form more complex WS• Platform independent. Based on a concise
set of open, XML-based standards designed to promote interoperability.
![Page 8: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/8.jpg)
• Web Services Description LanguageWSDL
• Simple Object Access ProtocolSOAP
• Universal Description, Discovery and Integration
UDDI
Terminology
![Page 9: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/9.jpg)
WSDLWeb Services Description Language
• Written in XML• Used to describe Web services• Used to locate Web services• Specifies:
• Location of the service • Operations (or methods) the service exposes
![Page 10: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/10.jpg)
WSDL Document Structure
Element Description<types> Data Type Definitions
<message> Data being communicated (parameters)
<portType> Set of Operations (Library or Class)
<binding> Protocol and Data Format for each port
![Page 11: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/11.jpg)
SOAPSIMPLE OBJECT ACCESS PROTOCOL
• Communication protocol between applications
• Format for sending messages• Platform and language independent• Based on XML• Simple and extensible• Allows you to get around firewalls
![Page 12: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/12.jpg)
UDDIUNIVERSAL DESCRIPTION, DISCOVERY
AND INTEGRATION
• Directory service where companies can search for Web Services
• Is described in WSDL• Communicates via SOAP
![Page 13: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/13.jpg)
How Web Services Work?Creating = PublishingUsing = Consuming
![Page 14: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/14.jpg)
SOAP MESSAGES
• MUST• Use the SOAP Envelope namespace• Use the SOAP Encoding namespace
![Page 15: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/15.jpg)
SOAP Message Elements
• <envelope>• Required, defines XML as SOAP message
• <header>• application-specific info (authentication,
payment, optional.
• <body>• SOAP message for the ultimate endpoint• Required
• <fault>• Indicate error messages• Optional
![Page 16: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/16.jpg)
Example (ASP.NET)
1. Create a new WebSite (empty)2. Add New Item -> “Web Service”3. Modify default method “HelloWorld”
ASP.NET AUTOMATICALLY CREATES WSDL AND SOAP .
![Page 17: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/17.jpg)
![Page 18: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/18.jpg)
WSDL
![Page 19: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/19.jpg)
SOAP
![Page 20: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/20.jpg)
![Page 21: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/21.jpg)
![Page 22: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/22.jpg)
Resources• W3schools.com
http://www.w3schools.com/webservices/
• MSDNhttp://msdn.microsoft.com/en-s/library/System.Web.Services.aspx
• Iverson, Will. Real World Web Services. O'Reilly Media, Inc. 2004.
• Guruge, Anura. Web Services: Theory and Practice. Elsevier Inc. 2004
• **Manes, Anne Thomas. Web Services: A Manager's Guide. Addison-Wesley. 2003
![Page 23: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/23.jpg)
QUESTIONS?
![Page 24: Web Services](https://reader036.vdocument.in/reader036/viewer/2022081520/5681637d550346895dd45ccb/html5/thumbnails/24.jpg)
ASSIGNMENT
• Create a “HelloWorld” Web Service and call it fromyour webpage .
Please send your results to [email protected]