Upload
imran-zahi
View
223
Download
0
Embed Size (px)
Citation preview
7/28/2019 How Web Services Work
1/24
Web services Definition:
Software components that can be
published, located, and run over theInternet using Extensible MarkupLanguage (XML)
Used to: Allow other applications to call
modules of code remotely with XML
Expose data in a database as XML
Send XML messages
7/28/2019 How Web Services Work
2/24
Extensible Markup Language (XML) Definition:
A markup language that describes data in astructured and human-readable text format
Example:Craig Duncanstudent37.3
Related to HTML, but more powerfulbecause XML can be modified and extended Has become the de facto standard for
representation of information content Has become the language of choice for
information exchange
7/28/2019 How Web Services Work
3/24
Web services diagram
Note: Simple Object Access Protocol (SOAP) is an XML message format
7/28/2019 How Web Services Work
4/24
Reasons to use Web services Applications can be built that are:
Platform-independent Distributed Secure
Web services will become the commonarchitecture for system and applicationintegration Based on open industry standards
Companies and government agencieswill be able to easily communicate withcustomers and external partners
7/28/2019 How Web Services Work
5/24
More reasons to use
Web services Loosely-coupled and flexible systems
are more useful than hard-wired andmonolithic ones: Example World Wide Web Service Oriented Architecture (SOA)
Companies and government agencieswill be able to access software remotely
that they or others have already built(reuse) Organizations will be able to extend the
life and value of legacy systems byexposing existing data as XML
7/28/2019 How Web Services Work
6/24
Even more reasons to use
Web services Developers will be able to integrate
applications: Quickly Easily Inexpensively
Software development and maintenancetime will be reduced Increase efficiency 30% Gartner
Data can be secured using industrystandard security methods: Secure Socket Layer (SSL) protocol
Public-key certificates WS-Security
7/28/2019 How Web Services Work
7/24
Web services issues Not a silver bullet
Web services provide plumbing betweenapplications
However, plumbing is essential Easy to write, hard to get right
Distributed and asynchronous software isthe hardest to develop and debug
However, not impossible XML is wordy
Takes up a lot of processor timeand bandwidth
However, up to a 90% compression ratio
7/28/2019 How Web Services Work
8/24
Web services technologies
(all based on XML)Name Abbreviation Use
Extensible MarkupLanguage
XML Language
Universal Description,Discovery, and Integration
UDDI Discovery
Web Services DescriptionLanguage WSDL Description
Simple Object AccessProtocol
SOAP Request and receivemessages
7/28/2019 How Web Services Work
9/24
Ordering at a restaurant diagram
7/28/2019 How Web Services Work
10/24
Calling a Web service diagram
7/28/2019 How Web Services Work
11/24
Web Service Description
Language (WSDL) Description
Web service equivalent of a menu
Uses XML to describe what the Webservice can do: Interface information (available functions)
Function data types
Function location information (URL address) Choice of application transfer protocol
7/28/2019 How Web Services Work
12/24
Application transfer
protocol choices Hypertext Transfer Protocol (HTTP)
Simple Mail Transfer Protocol (SMTP)
File Transfer Protocol (FTP) Blocks Extensible Exchange Protocol
(BEEP): A replacement for HTTP in critical
applications A generic application layer template
Uses XML to define the protocol syntax
Peer-to-peer (can be used client/sever)
Avoids the use of port 80
7/28/2019 How Web Services Work
13/24
Simple Object Access
Protocol (SOAP)Request and receive messages
Web service equivalent of an order
A Remote Procedure Call (RPC)that consists of XMLsent over HTTP
Other transport protocols can be used Similar in structure to a letter:
A message is written in XML
The message is wrapped in anXML envelope
7/28/2019 How Web Services Work
14/24
Sample SOAP request message
N99
7/28/2019 How Web Services Work
15/24
Sample SOAP response message
Brandywine Airport
West Chester, PA3347
7/28/2019 How Web Services Work
16/24
Development platforms Latest development environments and tools
understand Web service technologies:
Microsoft .NET platform
Java 2 Standard Edition (J2SE) platform
Programmers using .NET and Java do notneed to create or view UDDI, WSDL, orSOAP files directly
.NET developers only have to mark a functionwith a [WebMethod] attribute and it can becalled across the Internet
Java developers use the @Remote attribute
7/28/2019 How Web Services Work
17/24
Distributed application problems Developers writing distributed
applications need a way to provide: Security
Message integrity
Message confidentiality
Authentication
Authorization
Non-repudiation Reliability
Transactions
Etc.
7/28/2019 How Web Services Work
18/24
Solution: Web Services
Architecture (WSA) Set of infrastructure protocols that solve the
problems that every distributed applicationwritten with Web services faces
Allows developers to concentrate on writingsoftware
Similar to the U.S. Post Office:
You can place an addressed, stamped, and sealed
envelope in a mailbox and you dont have to worryabout anybody looking inside it or how it will get toits destination
You have the option to use additional services likecertified mail
7/28/2019 How Web Services Work
19/24
WSA design principles General purpose
Independent of application domain
Standards-based Uses widely accepted protocols
Federated
No central point of control, administration,or failure
Modular
Protocols can be used individually or
work together
7/28/2019 How Web Services Work
20/24
WSA security protocols diagram
7/28/2019 How Web Services Work
21/24
WS-Security The most important WSA security protocol
because the other security protocols use it
Provides message integrity: XML Signature
Uses an algorithm to create a message digest
The recipient compares the digest to the message
The digest needs to be encrypted
Security tokens (identity authentication) Username and password (needs SSL or VPN) X.509 certificate
Kerberos ticket
Provides message confidentiality: XML Encryption
Security tokens (same as above)
7/28/2019 How Web Services Work
22/24
More WSA protocols WS-ReliableMessaging
Allows messages to be delivered in the
presence of software and network failures WS-Addressing
Defines Web service endpoints whichallow message transmission through
gateways and firewalls WS-Routing
Allows a SOAP message to specifya virtualized path through a network
7/28/2019 How Web Services Work
23/24
Even more WSA protocols WS-Attachments
Allows attached files (documents,
pictures, sound, video, etc.) to besent with SOAP messages
WS-Transactions
Allows applications using more than one
Web service to coordinate changes Etc.
7/28/2019 How Web Services Work
24/24
Sample SOAP message with
WSA information in the header
http://ws.c3daero.com/getairportinformation
soap://c3daero.com/airports
mailto:[email protected]
uuid:84b9f5d0-33fb-4a81-b02b-5b760641c1d6
DJbchm5gK...
...
...