Introduction to Web Services - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Introduction to Web Services

Description:

meta http-equiv='content-type' content='text/html; charset=ISO-8859-1' title memo.html /title ... getProductDetails xmlns='http://warehouse.example.com/ws' ... – PowerPoint PPT presentation

Number of Views:51
Avg rating:3.0/5.0
Slides: 17
Provided by: cseBu
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Web Services


1
Introduction to Web Services
  • Bina Ramamurthy
  • bina_at_cse.buffalo.edu
  • This work is partially supported by
  • NSF-DUE-CCLI-AI Grant 0311473

2
Topics for Discussion
  • Webservices and Service Oriented Architectures
    (SOA)
  • XML (eXtensible Markup Language)
  • SOAP (Simple Object Access Protocol)
  • WS (Web Services)
  • Summary

3
Web Services and SOA
  • Web Services is a technology that allows for
    applications to communicate with each other in a
    standard format.
  • A Web Service exposes an interface that can be
    accessed through XML messaging.
  • A Web service uses XML based protocol to describe
    an operation or the data exchange with another
    web service. Ex SOAP
  • A group of web services collaborating accomplish
    the tasks of an application. The architecture of
    such an application is called Service-Oriented
    Architecture (SOA).

4
SOA in Real World Report in InfoWorld, May 2,
2005 Issue 18
  • http//www.infoworld.com/article/05/05/02/18FEsoab
    t_1.html?WEB20SERVICES
  • State of Massachusetts uses SOA to deliver
    healthcare services. With HTML web application it
    had no control of look and feel and handling many
    hospitals. With SOAP based messaging they can
    easily handle different systems, billing systems,
    medical records systems etc. Use Microsoft-based
    systems.
  • Countrywide financial simplifies lending IBM
    Websphere based SOA is used to deliver services.
  • Guardian Life Insurance uses SOA IBM websphere
    based services. Uses EJB for business logic.
  • British Telecom uses combination of BEA systems
    and Microsofts Connected Services Framework.
    Billing backend and operational support for the
    organization are web services. Legacy systems are
    enabled as web services.
  • Amazon.com provides WS API for developers to
    implement applications leveraging their
    architecture and data.

5
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.

6
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.

7
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).

8
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
  • CSE507 SOA and WS 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
  •   lttogtCSE507 SOA and WS Studentslt/togt
  •   ltbodygtWake up everyonelt/bodygt
  •   ltsigngtbrlt/signgt
  •   lt/memogt

9
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)

10
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
11
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
12
SOAP?Web Services (WS)?SOA
  • Read this paper
  • http//www.w3.org/DesignIssues/WebServices.html

13
WS Stack
Service Flow
WSFL
Service Discovery
UDDI
Service Publication
UDDI
Service Description
WSDL
XML-based Messaging
SOAP
HTTP, FTP, MQ Email, IIOP
Network
14
WS Interoperability Infrastructure
Service Description
WSDL
XML Messaging
SOAP
Network
HTTP
Do you see any platform or language dependencies
here?
15
Service Oriented Architectures
  • Lets look at some success stories.
  • Amazon.com has is data collection available web
    services developers.
  • See these URLs
  • Amazon.com E-Commerce Service (ECS)
  • A cool application

16
Summary
  • We looked at foundational concepts supporting web
    services XML, SOAP, WSDL and Web Services
    standards.
  • We also illustrated the concepts using sample
    programs.
Write a Comment
User Comments (0)
About PowerShow.com