Web Services Overview
description
Transcript of Web Services Overview
Web Services OverviewWeb Services Overview
Ashraf MemonAshraf Memon
2
Overview
• Service Oriented Architecture
• Web service overview
• Benefits of Web services
• Core technologies: XML, SOAP, WSDL
3
Service Oriented Architectures• essentially a collection of services.
• services communicate with each other.
Service Provider
ServiceConsumerResponse
Request
4
• communication can involve either simple data passing.
Service Oriented Architectures
Service Provider
ServiceConsumer
Response
Request
Service Provider
Procedure/Workflow
Request/Response
Service Provider
Service Provider
Request/Response
Request/Response
Service Consumer
Data
Data
Data
Data
• could also involve two or more services coordinating some activity.
5
• Service Oriented Architectures are not new• Previous implementation
– DCOM - Distributed Component Object Model (Microsoft)
– ORB Object Request Brokers based on CORBA Specifications (Java)
• Very Complex – Non standard interchange format– Binary information interchange– Very few tools
• New Implementations– Web Services
Service Oriented Architectures
6
What are Web Services?
• A Web Service is programmable application logic accessible using standard Internet protocols.
7
8
Web services
Piece of Code
Database
Files
ToolMS COM
C
Java
Perl
Fortran
Other tools
• Web service is any piece of code that can be made available over the Internet, so that other applications can invoke it and utilize its functionality.
9
What are Web Services? ….
Piece of Code
DeploymentScript
Soap Server
Service Provider
Code
ServiceDescription
Soap Client
API
Service Client
SOAPover
HTTP
Service Description
Soap L
istener
Header
Body
ServiceResponse
Response
Soap Body
Request
Header
Request Params
Body
WSDL
SOAP
10
Benefits of Web Services
• Facilitates reuse of existing assets• Lower cost of maintenance• Reduced impact of change• Example
– GRIDgrid• AsciiToMap, XMLToMap, ShapeToMap• Benefits include availability of useful functionality on the web
– Arcweb Services• Pool of web services that provide mechanism to access data and GIS
functions on demand.• Benefits include, access to terabytes of spatial data, complex GIS
functionality, etc.
11
XML
• XML is a programming/formatting language and is basically another version of HTML
• It provides a mechanism to describe structure and organization of Data
12
XML Example<?xml version=“1.0”?>
<Names><Name>Adam Bosworth</Name>
<Title>General Manager </Title> <Phone>222-444-666</Phone> <Company>XYZ Corp.</Company>
<PIN>2468</PIN> </Names>
13
SOAP
• SOAP stands for Simple Object Access Protocol.
• SOAP is a simple XML based protocol to let applications exchange information over HTTP.
• SOAP is a protocol for accessing a Web Service.
14
SOAP ExamplePOST /InStock HTTP/1.1 Host: www.stock.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn
<?xml version="1.0"?> <soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body
xmlns:m="http://www.stock.org/stock"> <m:GetStockPrice>
<m:StockName>IBM</m:StockName> </m:GetStockPrice>
</soap:Body></soap:Envelope>
15
WSDL
• WSDL stands for Web Services Description Language
• WSDL (Web Services Description Language) is an XML-based language for describing Web services and how to access them.
17
Next Chapter
• Establishing a foundation for web services