Title: Web Services
1Web Services
- Ellen Lay
- Software Developer
- March 26, 2008
2What is a Web Service?
A Web Service is a software system designed to
support interoperable machine-to-machine
interaction over a network.
-World Wide Web Consortium (W3C)
- Clients and Servers that communicate over HTTP
protocol that are used on the web.
3What is a web service?
A web service is any service
- that is available over the internet
- Uses a standardized XML messaging system
- Not tied to any operating system
- Not tied to any programming language
Should also be
- Self describing // publish interface for use
- Discoverable // register service
4Background
(How did web services come to exist?)
- Companies computerize their services resulted in
isolated computer systems - Mergers, acquisitions, business growth happened
- Internet helped out BUT
- Work around new distributed technologies
emerged RMI, DCOM, CORBA clunky!
5So what makes web services better?
- Based on existing, well known HTTP
- Uses XML messages
- Based on set of standardized rules and
specifications (makes it portable) - Developer friendly
- Lots of SOAP tools available in many programming
languages - Lots of XML tools that read, write, generate XML
6What are the goals of web services?
- Sharing of information, and computing routines
between remote, isolated computer systems made a
lot cheaper and easier - Makes Business-to-Business communication more
efficient
7Web Terminology
- URI Uniform Resource Identifier
- Internet
- The hardware and software infrastructure part of
the global network of interconnected computers - the Web
- Very large set of interlinked hypertext documents
(webpages) accessed via the Internet - Note
- the Web is not synonomous with the Internet
8Hypertext Transfer Protocol (HTTP)
- Document-based protocol
- Client puts a document in an envelop, sends to
server - Server replies by putting a response in envelope
and sends to client. - Strict standards for how to address envelope
- Envelope contents can be anything
9HTTP Request
The path
HTTP Method
Request Headers (metadata) 8 total
Document inside
10The Human Centric Web
- Humans are actors
- user web browsers
- Audio players
- Other front end GUIs
Users Focused on retrieval display of
data Content raw data presentation mark up
11Amazon book search example
12Search results (human)
13Web Services The Programmable Web
- Conversations take place between applications, as
easily as between web browsers servers - Based on XML, and HTTP
- Examples
- Package Tracking
- Credit Card Verification
- Language Translation Babel fish
- Shopping Bots
Content raw data // Meant as input to
applications Applications are interpreting
response instead of humans
14Run Ruby Code, Get Output
Run the Ruby Code
Program/Client Output - XML Document
15What XML is!
- Extensible Mark up Language (XML)
- Simple, Flexible, Strict, Portable,
Standards-based Format - Defines a generic syntax used to mark up data
thats - Simple
- Human Readable
- Delivers valid data!
- XML Specification has strict rules, (grammar)
about document format - Allowed placement of tags
- How attributes can be attached to elements
- Where tags can appear
- Acceptable names for tags
- Which elements are legal
16How does XML differ from HTML?
- XML is a structural, semantic markup language.
HTML is a presentation language - XML you can create your own tags. HTML
finite set of predetermined tags - XML is flexible, you can define your own tags
as you need them. HTML you cannot define your own
tags. - XML provides strict rules for structure of a
document. - XML application (i.e. SVG), is a set of defined
XML tags
17XML is Cool!
- XML simply the most robust, reliable, and
flexible document syntax ever invented - XML is syntax of choice for newly designed
document formats across almost all computer
applications - Interesting examples
- Used to trade stocks on Wall Street
- Save state of video games
- Delivers real-time game scores to cell phones
18XML Flexible? OMG
- Flexible enough to be customized for domains as
diverse as
- Websites
- Electronic data interchange
- Geneology
- Real estate listing
- Object serialization
- Remote Procedure Calls (RPCs)
- Voice mail systems
19Steps in Creating Web Services
- Step 1 Define the data that comprises a request
- URL, arguments, XML/HTML/JSON - Step 2 Create HTTP request
- Step 3 Parse/interpret the response data
stickers say how to parse/interpret - Two Approaches
- Current Standard Big Web Services/SOAP
Services - Emerging Standard RESTful Services
20How do Big Web Services work?