Web Services Overview: A technical introduction - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Web Services Overview: A technical introduction

Description:

... coupling means that we cannot expect to know what is actually happening behind the scenes' ... Transfer Protocol used for browsing the World Wide Web) ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 16
Provided by: archive6
Category:

less

Transcript and Presenter's Notes

Title: Web Services Overview: A technical introduction


1
Web Services OverviewA technical introduction
  • Clovis Chapman
  • Department of Computer Science
  • University College London
  • c.chapman_at_cs.ucl.ac.uk

2
The travel agent example
Bank
AccountingService
Debit
Success
Travel Agent
Booking
Reserve seat
Success
Airline
ReservationService
3
Examples of (public) Web Services
  • Amazon.com E-commerce service
  • Allows third-party sites to retrieve and display
    product information on their own web site
  • Enable referral sales
  • Google Web Service (beta)
  • Enables users to conduct web searches within
    their own applications for non-commercial use
    only
  • Do a web Search and obtain web page references
  • Obtain a copy of web page cached by google
  • Obtain spelling suggestions

4
An example for the NIEES
UCL Condor pool
Job submission Service
Run Simulation
Results
Simulation Request
My-App Portal
Store results
Success
Cambridge
  • Web Services are not
  • Web Pages (WWW)
  • Related to Web browsing

Data Repository
5
Overview A few keywords
  • (Internet scale) Service-oriented architecture
    each service represents a set of functionality
    that can be requested in the form of individual
    operation calls
  • Loose-Coupling
  • Web Services intended for interaction across
    organizational boundaries (components must be as
    independent as possible)
  • Platform-heterogeneity using XML
  • Loose-coupling means that we cannot expect to
    know what is actually happening behind the
    scenes (e.g. Operating systems a linux client
    must be capable of interacting with a windows
    service)

Site B
Web Server
Site A
Run Simulation(job)
Client
Condor Service
Service 2
5
6
Web Services
  • Essentially a collection of protocols and
    standards (XML-based)
  • These standards define
  • Which operations/requests a service may support
  • How to format requests
  • Security
  • Can mix and match according to requirements (in
    theory)
  • Numerous implementations and development Kits
    available (Apache Axis, gSOAP, .Net, etc.)

7
First things first XML
  • eXtensible Mark-up Language Text-based data
    formatting Language
  • (similar to HTML but NOT HTML)
  • Can define your own elements and document
    structure
  • The key to enabling platform-heterogeneity

8
First things first XML - Schemas
  • Schemas enable constraints to be defined for the
    structure of the XML document and content
  • Schemas enable you to define your own XML syntax
    e.g. types or categories of elements
  • Facilitates parsing of XML documents

1 Namespaces
ltschema xmlnsxsd"http//www.w3.org/2001/XMLSche
ma"gt ltcomplexType namebook"gt
ltsequencegt ltelement ref"author
typestring /gt ltelement ref"title
typestring/gt ltelement refinStock
typeinteger/gt lt/sequencegt
lt/complexTypegt lt/schemagt
2 Type
9
Web Services Architecture Overview
Site B
Web Server
Site A
Condor Service
Client
Service 2
10
Web Service Description Language
  • Used to describe the functionality provided by a
    service and how to communicate with it

ltdefinitions nameJobSubmissionService
targetNamespaceurnCondorgt lttypesgt
ltcomplexType nameJobgt ltsequencegt
ltelement nameinput typeStringgt ..
lt/sequencegt lt/complexTypegt
lt/typesgt ltmessage nameStartJobRequestgt
ltpart nameJobRequest typeJob /gt
lt/messagegt ltportType
nameSubmissionPortTypegt ltoperation
nameStartJobgt ltinput nameStartJobReques
t typeStartJobRequest /gt ltoutput name
gt lt/operationgt lt/portTypegt ltbinding
name gt ltsoapbinding stylerpc
transporthttp//schemas.. /gt ltoperation
nameStartJobgt lt!- encoding format for each
message --gt lt/operationgt lt/bindinggt
ltservice nameJobSubmissionServiceImplgt
ltport nameSubmissionPort binding..gt ltsoapa
ddress locationhttp//hello.ac.uk/services/gt
lt/portgt lt/servicegt
Definitions service name, namespaces, schemas
Types description of datastructures used
Can be automatically generated! e.g. Java2WSDL
(Axis)
Messages structure of messages exchanged
PortType set of operations supported
Binding info on protocol and dataencoding for
operation invocations
Service port specifies the endpoint address
11
Simple Object Access Protocol
  • XML-based protocol for message exchange between
    client and service
  • Does not have to be SOAP
  • Wrapped in HTTP packet (Hypertext Transfer
    Protocol used for browsing the World Wide Web)
  • Better firewall management (in theory)
  • Can use other transport protocols

HTTP header (POST)
SOAP Action
ltSOAP-ENVBodygt ltmStartJobRequest
xmlnsm"some-URI"gt ltsymbolgtDEFlt/Symbolgt
lt/mStartJobRequestgt lt/SOAP-ENVBodygt
Request
HTTP header
ltSOAP-ENVBodygt ltmStartJobResponse
xmlnsm"some-URI"gt ltresultgt22.50lt/resultgt
lt/mStartJobResponsegt lt/SOAP-ENVBodygt
Response
12
SOAP and Firewalls?
  • HTTP traffic is usually allowed through firewalls
    for web browsing (in theory)
  • Bypassing firewalls defeats their purpose
  • Some firewalls can filter SOAP headers but not
    easy
  • However Web Services allow session management
    through a single port
  • Multiple services can be accessed through a
    single port
  • Simplifies firewall administration

13
SOAP attachments
  • SOAP body is restricted to XML character set
  • Attachments provide us with means to transfer
    binary data (i.e. non text) e.g. input files
    for jobs
  • Uses MIME (Multi-Purpose Internet Mail
    Extensions) originally defined for e-mail
    attachments
  • MIME provides encoding schemes that allow binary
    content to be transmitted over transports that
    are not otherwise able to do so.
  • Any type of data can accompany SOAP
  • Can still add a considerable overhead (e.g.
    base64 encoding can add 33)
  • But probably less overhead than converting your
    data to XML

14
Web Service Discovery - UDDI
  • Universal Description Discovery and Integration
  • Enables Just-in-time integration

Registry
find
Publish description
Client
Service
use
15
Building your first Web Service Client
  • Using Axis API.
  • Generate stubs from WSDL file using WSDL2Java
  • e.g. Submit a Job to a JobSubmissionService
  • locator new ServiceLocator()
  • service locator.getJobSubmissionService(new
    URL(http//machineport))
  • result service.startJob(myJob)
Write a Comment
User Comments (0)
About PowerShow.com