Chapter 2: Basic Standards for Web Services - PowerPoint PPT Presentation

About This Presentation
Title:

Chapter 2: Basic Standards for Web Services

Description:

Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh ... HTML (HyperText ML): simple, unprincipled, mixes ... XML Basics and Namespaces ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 21
Provided by: DrMunind5
Category:

less

Transcript and Presenter's Notes

Title: Chapter 2: Basic Standards for Web Services


1
  • Chapter 2Basic Standards for Web Services

Service-Oriented Computing Semantics, Processes,
Agents Munindar P. Singh and Michael N. Huhns,
Wiley, 2005
2
Highlights of this Chapter
  • eXtensible Markup Language (XML)
  • Simple Object Access Protocol (SOAP)
  • Web Services Description Language (WSDL)
  • Directory Services
  • Universal Description, Discovery, and Integration
    (UDDI)

3
Standards for Web Services
4
Markup and Metadata History
  • None, e.g., CSV
  • Ad hoc tags
  • SGML (Standard Generalized Markup L) complex,
    few reliable tools
  • HTML (HyperText ML) simple, unprincipled, mixes
    structure and display
  • XML (eXtensible ML) simple, yet extensible
    subset of SGML to capture new vocabularies
  • Machine processible
  • Generally, comprehensible (easier debugging),
    though verbose and arcane

5
XML Basics and Namespaces
  • lt?xml version"1.0"?gt lt! not part of the
    document per se --gt
  • ltarbitrarytoptag xmlns"http//one.default.namesp
    ace/if-needed"
  • xmlnsarbitrary"http//wherever.it.might.be/arb
    it-ns"
  •       xmlnsrandom"http//another.one/random-ns"gt
  •      ltarbitraryatag attr1"v1" attr2"v2"gt
  • Optional text also known as PCDATA
  • ltarbitrarybtag attr1"v1" attr2"v2" /gt
  • lt/arbitraryataggt
  • ltrandomsimple_tag/gt lt! abbreviate start and end
    --gt
  • ltrandomatag attr3"v3"/gt lt! compare
    arbitraryatag --gt
  • lt/arbitrarytoptaggt

6
XML Schema
  • Grammar (data definition language) for specifying
    valid documents
  • Uses same syntax as regular XML documents
    verbose and difficult to read
  • Provides local scoping of subelement names
  • Incorporates namespaces
  • Types
  • Primitive (built-in) string, integer, float,
    date,
  • simpleType constructors list, union
  • Restrictions intervals, lengths, enumerations,
    regex patterns,
  • Flexible ordering of elements
  • Key and referential integrity constraints

7
Web Services Basic Architecture
Service Broker
Registry well-known
Find or discover (UDDI)
Publish or announce (WSDL)
Service Provider
Service Requestor
Bind or invoke (SOAP)
Not well-known
8
Basic Profile (BP 1.0)
  • The Web Services Interoperability Organization
    (WS-I) has specified the following Basic Profile
    version 1.0
  • SOAP 1.1
  • HTTP 1.1
  • XML 1.0
  • XML Schema Parts 1 and 2
  • UDDI Version 2
  • WSDL 1.1

9
Describing a Service
  • Namee.g., GetTemperature
  • Types of Input Parameterse.g., (String, String)
  • Types of Output Parameterse.g., Integer

10
SOAP (Simple Object Access Protocol)
  • Used to exchange messages via HTTP, SMTP, and SIP
    (Session Initiation Protocol for Internet
    telephony)
  • Originally designed for remote-procedure calls
    (RPC)
  • Works through firewalls on port 80
  • Character-based, so easy to encrypt/decrypt and
    thus easy to secure
  • Inefficient due to character, not binary, data
    and large headers
  • Does not describe bidirectional or n-party
    interaction

11
Ex. SOAP Request
  • POST /temp HTTP/1.1
  • Host www.socweather.com
  • Content-Type text/xml charset"utf-8"
  • Content-Length xxx
  • SOAPAction "http//www.socweather.com/temp"
  • lt!-- Above HTTP headers and a blank line. --gt
  • lt!These comments and below an XML document --gt
  • lt?xml version1.0?gt
  • ltenvEnvelope
  • xmlnsenv"http//schemas.xmlsoap.org/soap/envelo
    pe/"
  • envencodingStyle"http//schemas.xmlsoap.org/soa
    p/encoding/"/gt
  • ltenvBodygt
  • ltmGetTemp xmlnsm"http//www.socweather.com/te
    mp.xsd"gt
  • ltmCitygtHonolulult/mCitygt
  • ltmWhengtnowlt/mWhengt
  • lt/mGetTempgt
  • lt/envBodygt
  • lt/envEnvelopegt

12
Ex. SOAP Response
  • HTTP/1.1 200 OK
  • Content-Type text/xml charset"utf-8"
  • Content-Length xxx
  • SOAPAction "http//www.socweather.com/temp"
  • lt?xml version"1.0"?gt
  • ltenvEnvelope xmlnsenv"http//schemas.xmlsoap.or
    g/soap/envelope/"
  • envencodingStyle"http//schemas.xmlsoap.org/
    soap/encoding/"/gt
  • ltenvBodygt
  • ltmGetTempResponse
    xmlnsm"http//www.socweather.com/temp.xsd"gt
  • ltmDegreesCelsiusgt30lt/mDegreesCelsiusgt
  • lt/mGetTempResponsegt
  • lt/envBodygt
  • lt/envEnvelopegt

13
WSDL Web Services Description Language
  • Describes a programmatic interface to a Web
    service, including
  • Definitions of data types
  • Input and output message formats
  • The operations provided by the service
  • Network addresses
  • Protocol bindings

14
WSDL Data Model
15
Directory Services
  • Support discovery enable applications, agents,
    Web service providers, Web service requestors,
    people, objects, and procedures to locate each
    other
  • White pages entries found by name
  • Yellow pages entries found by characteristics
    and capabilities
  • A basic directory might be a simple database
    (passive) or a broker/facilitator (active, that
    provides alerts and recruits participants)
  • UDDI both white pages and yellow pages, but
    passive

16
UDDI Universal Description, Discovery, and
Integration
  • UDDI is a Web service that is based on SOAP and
    XML
  • UDDI registers
  • tModels technical descriptions of a services
    behavior
  • businessEntities describes the specifications of
    multiple tModels

17
Yellow, Green, and White Pages in UDDI
18
Data Model for UDDI
19
WSDL ?? UDDI
20
Chapter 2 Summary
  • The main triad of Web services standards
  • Bring together well-known ideas
  • SOAP object access and messaging
  • WSDL based on CORBA IDL
  • UDDI based on directories
  • Provide necessary functionality for
    interoperation
  • Are complicated in their details
  • Meant for tool vendors rather than programmers
  • Increasingly hidden by tools
Write a Comment
User Comments (0)
About PowerShow.com