Introduction to Web Services - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction to Web Services

Description:

Title: PowerPoint Presentation Author: bina Last modified by: bina Created Date: 1/1/1601 12:00:00 AM Document presentation format: On-screen Show (4:3) – PowerPoint PPT presentation

Number of Views:11
Avg rating:3.0/5.0
Slides: 19
Provided by: bina1
Learn more at: https://cse.buffalo.edu
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Web Services


1
Introduction to Web Services
  • Bina Ramamurthy
  • bina_at_cse.buffalo.edu

2
Topics for Discussion
  • HTTP Hyper Text Transfer Protocol
  • HTML Hyper Text Markup Language
  • XML eXtensible Markup Language
  • Resource references on the web
  • Web services
  • SOAP Simple Object Request Protocol
  • REST Representational State Transfer
  • Summary

3
HTTP
  • Protocol for communication among web entities.
  • It is a standard from IETF (Internet Engineering
    Task Force) and W3C (World Wide Web Consortium)
  • Request-response model for client-server systems
  • HTTP operates by sending requests with
    operations to be performed on resources referred
    by Uniform Resource Identifiers (URI)
  • Request methods are HEAD, GET, POST, PUT,
    DELETE, TRACE, PATCH (just a few standard
    commands)

4
HTML
  • Hyper text mark-up language
  • Standard markups for structural organization of
    web pages
  • Example
  • lttrgt lttd style"vertical-align top"gtltbrgt lt/tdgt
    lttd style"vertical-align top"gtFile Systemltbrgt
    lt/tdgt lttd style"vertical-align top"gtlta
    href"FileSystemOct21.ppt"gtFileSyslt/agtltbrgt lt/tdgt
    lttd style"vertical-align top"gtltbrgt lt/tdgt lt/trgt

5
HTML over HTTP
Web server http//www.cse.buffalo.edu/faculty/bina
Request Get http
Web Browser
browser interpretation of index.html
Response index.html
Web Browser
Web Browser
6
XML
  • XML is a markup language, developed by W3C (World
    Wide Web Consortium), mainly to overcome the
    limitations of HTML.
  • But it took a life of its own and has become a
    very popular part of distributed systems.
  • We will examine its definition, associated
    specifications (DTD, XSLT etc.), Java APIs
    available to process XML, protocols and services
    based on XML, and the role XML plays in a
    distributed computing environment.

7
First Look at XML
  • It has no predefined tags.
  • Such as in HTML
  • Domains may specify their own set of standard
    tags
  • It is stricter.
  • Most html document have errors and the browser
    have to built to take care of these.
  • On the other hand XML has a strict syntax.
  • There is a notion of validity and
  • A notion of well-formed.

8
An Example Memo
  • See the two documents enclosed one in html and
    the other in XML formats.
  • Observe the meaningful tags in XML.
  • Compare it to a class definition it looks like a
    class with data definitions and accessors (tags).

9
Memo.html vs memo.xml
  • lt!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"gt
  • lthtmlgt
  • ltheadgt
  • ltmeta http-equiv"content-type"
  • content"text/html charsetISO-8859-1"gt
  • lttitlegtmemo.htmllt/titlegt
  • lt/headgt
  • ltbodygt
  • lth3gtHello Worldlt/h3gt
  • Binaltbrgt
  • CSE486 DS Students ltbrgt
  • Wake up everyoneltbrgt
  • BRltbrgt
  • ltbrgt
  • lt/bodygt
  • lt/htmlgt
  • lt?xml version"1.0" ?gt
  •   lt!DOCTYPE memo (View Source for full
    doctype...)gt
  • - ltmemogt
  •   ltheadergtHello Worldlt/headergt
  •   ltfromgtbinalt/fromgt
  •   lttogtCSE486 DS Studentslt/togt
  •   ltbodygtWake up everyonelt/bodygt
  •   ltsigngtbrlt/signgt
  •   lt/memogt

10
XML
11
XML parsing
  • Lets understand XML parsing.
  • Reference http//java.sun.com/developer/technical
    Articles/xml/mapping/index.html
  • Mapping/parsing is similar to compiling if it is
    not valid or well formed, the parser is going to
    complain
  • Lets look at some examples starting from the very
    beginning.

12
XML to SOAP
  • Simple xml can facilitate sending message to
    receive information.
  • The message could be operations to be performed
    on objects.
  • Simple Object Access Protocol (SOAP)
  • Representational State Transfer (REST) is an
    architectural pattern on HTTPs methods

13
SOAP Request
ltsoapEnvelope xmlnssoap"http//schemas.xmlsoap.
org/soap/envelope/"gt ltsoapBodygt
ltgetProductDetails xmlns"http//warehouse.example
.com/ws"gt ltproductIdgt827635lt/productIdgt
lt/getProductDetailsgt lt/soapBodygt
lt/soapEnvelopegt
14
SOAP Reply
ltsoapEnvelope xmlnssoap"http//schemas.xmlsoap.
org/soap/envelope/"gt ltsoapBodygt
ltgetProductDetailsResponse xmlns"http//warehouse
.example.com/ws"gt ltgetProductDetailsResultgt
ltproductNamegtToptimate 3-Piece
Setlt/productNamegt ltproductIdgt827635lt/prod
uctIdgt ltdescriptiongt3-Piece luggage set.
Black Polyester.lt/descriptiongt
ltpricegt96.50lt/pricegt ltinStockgttruelt/inSto
ckgt lt/getProductDetailsResultgt
lt/getProductDetailsResponsegt lt/soapBodygt
lt/soapEnvelopegt
15
SOAP?Web Services (WS)?SOA
  • Read this paper
  • http//www.w3.org/DesignIssues/WebServices.html

16
WS Stack
Service Flow
WSFL
Service Discovery
UDDI
Service Publication
UDDI
Service Description
WSDL
XML-based Messaging
SOAP
HTTP, FTP, MQ Email, IIOP
Network
17
WS Interoperability Infrastructure
Service Description
WSDL
XML Messaging
SOAP
Network
HTTP
Do you see any platform or language dependencies
here?
18
Summary
  • We looked at foundational concepts supporting web
    services XML, SOAP, WSDL and Web Services
    standards.
  • We also illustrated the concepts using sample
    programs.
  • We will discuss REST-based web services and WDSL
    in the next lectures.
Write a Comment
User Comments (0)
About PowerShow.com