Justin Tilton instructional media magic, inc. - PowerPoint PPT Presentation

1 / 51
About This Presentation
Title:

Justin Tilton instructional media magic, inc.

Description:

CSG Mini-Workshop: Web Services Justin Tilton instructional media + magic, inc. As presented at the Common Solutions Group Meeting May 9, 2002 Chicago, Illinois – PowerPoint PPT presentation

Number of Views:92
Avg rating:3.0/5.0
Slides: 52
Provided by: immd9
Category:

less

Transcript and Presenter's Notes

Title: Justin Tilton instructional media magic, inc.


1
CSG Mini-Workshop Web Services
Justin Tiltoninstructional media magic,
inc. As presented at theCommon Solutions Group
Meeting May 9, 2002 Chicago, Illinois
2
Overview
  • Data XML
  • Validation Schema
  • Transport SOAP
  • Security SAML
  • Description WSDL
  • Directory UDDI
  • Transformation XSLT

3
DataXML Overview
4
XML is for structuring data 1
  • Structured data includes things like
  • spreadsheets, address books, configuration
    parameters, financial transactions, and technical
    drawings
  • XML is a set of rules for designing text formats
    that let you structure your data.
  • XML is not a programming language, and you don't
    have to be a programmer to use it or learn it

5
XML is for structuring data 2
  • XML makes it easier for a computer to generate
    data, read data, and ensure that the data
    structure is unambiguous
  • XML avoids common pitfalls in language design
  • it is extensible
  • it is platform-independent
  • and it supports internationalization and
    localization

6
XML is a family of technologies 1
  • XML 1.0 is the specification that defines what
    "tags" and "attributes" are
  • Xlink describes a standard way to add hyperlinks
    to an XML file
  • XPointer and XFragments are syntaxes in
    development for pointing to parts of an XML
    document
  • XSL is the advanced language for expressing style
    sheets. It is based on XSLT

7
XML is a family of technologies 2
  • XSLT is a transformation language used for
    rearranging, adding and deleting tags and
    attributes
  • XPath is a language for navigating in an XML
    document
  • XML Schemas help developers to precisely define
    the structures of their own XML-based formats.
  • XQuery provides flexible query facilities to
    extract data from real and virtual documents on
    the Web
  • XML Signatures provide integrity, message
    authentication, and signer authentication
    services for an XML document

8
XML is new, but not that new
  • Development of XML started in 1996 and has been a
    W3C Recommendation since February 1998
  • Before XML there was SGML, developed in the early
    '80s, and widely used for large documentation
    projects
  • The development of HTML started in 1990.
  • The designers of XML simply took the best parts
    of SGML, guided by the experience with HTML, and
    produced something very powerful

9
HTML and XHTML
  • The successor to HTML is XHTML
  • XHTML has almost all of the same elements as
    HTML, but the syntax has been changed slightly to
    conform to the rules of XML
  • XHTML allows "ltpgt", but not "ltrgt" since ltpgt is
    defined in XHTML and ltrgt is not
  • XHTML says that "ltpgt" stands for "paragraph", and
    not for "price", "person", or anything else
  • Emerging applications such as uPortal are using
    XHTML to output content to browsers

10
XML has namespaces
  • To eliminate name confusion when combining
    documents, XML provides a namespace mechanism
  • XSL and RDF are good examples of XML-based
    formats that use namespaces
  • XML Schema is designed to support modularity by
    defining XML document structures, making it easy
    to combine two schemas to produce a merged
    document structure.

11
XML is license-free
  • XML is license-free, platform-independent and
    well-supported
  • A large and growing community of tools and
    engineers experienced in the technology
  • Since XML is license-free, you can build your own
    software around it without fees

12
An example of XML element
  • lt?xml version"1.0"?gt
  • ltbreakfast_menugt
  • ltfoodgt
  • ltnamegtBelgian Waffleslt/namegt
  • ltpricegt
  • ltamountgt5.95lt/amountgt
  • ltcurrencygtUS Dollarslt/currencygt
  • lt/pricegt
  • ltdescriptiongttwo of our famous Belgian
    Waffles with plenty of real maple
    syruplt/descriptiongt
  • ltcaloriesgt650lt/caloriesgt
  • lt/foodgt
  • ltfoodgt
  • ltnamegtStrawberry Belgian Waffleslt/namegt
  • ltpricegt
  • ltamountgt7.95lt/amountgt
  • ltcurrencygtUS Dollarslt/currencygt
  • lt/pricegt
  • ltdescriptiongtlight Belgian waffles covered
    with
  • strawberries and whipped creamlt/descriptiongt

13
An example of XML attribute
  • lt?xml version"1.0"?gt
  • ltbreakfast_menugt
  • ltfoodgt
  • ltnamegtBelgian Waffleslt/namegt
  • ltprice currency"US Dollars"gt5.95lt/pricegt
  • ltdescriptiongttwo of our famous Belgian
    Waffles with plenty of real maple
    syruplt/descriptiongt
  • ltcaloriesgt650lt/caloriesgt
  • lt/foodgt
  • ltfoodgt
  • ltnamegtStrawberry Belgian Waffleslt/namegt
  • ltprice currency"US Dollars"gt7.95lt/pricegt
  • ltdescriptiongtlight Belgian waffles covered
    with
  • strawberries and whipped creamlt/descriptiongt
  • ltcaloriesgt900lt/caloriesgt
  • lt/foodgt

14
ValidationXML Schema Overview
15
What is an XML Schema?
  • XML Schema is an XML based alternative to
    Document Type Definition (DTD)
  • The purpose of an XML Schema is to define the
    legal building blocks of an XML document, just
    like a DTD.

16
An XML Schema defines
  • Elements and attributes that can appear in a
    document
  • Simple child-parent element relationships
  • The sequence in which the child elements can
    appear
  • The number of child elements
  • Whether an element is empty or can include text
  • Data types for elements and attributes
  • Default values for elements and attributes

17
XML Schemas replacing DTDs
  • We think that very soon XML Schemas will be used
    in most Web applications as a replacement for
    DTDs. Here are some reasons
  • XML Schemas are richer than DTDs
  • XML Schemas are written in XML
  • XML Schemas support data types
  • XML Schemas support namespaces
  • XML Schemas are extensible to future additions

18
XML Schema Data Types
  • With data type support it is easier to
  • Describe permissible document content
  • Validate the correctness of data
  • Work with data from a database
  • Define data facets (restrictions on data)
  • Define data patterns (data formats)
  • Convert data between different data types

19
Why Schema is important
  • A well-formed XML document is a document that
    conforms to the XML syntax rules
  • Even if documents are Well-Formed they can still
    contain errors, and those errors can have serious
    consequences.
  • With XML Schemas, most of these errors can be
    caught by your validating software.

20
XML Schema Practical
21
The simplest element definition
  • A schema specifies a set of valid top-level
    elements.
  • In the simplest case, we can define an element to
    describe a name of the city
  • Schema
  • ltxsdelement name"city" type"xsdstring"/gt
  • Document
  • ltcitygtWashingtonlt/citygt

22
Another element definition
  • A schema specifies a set of valid top-level
    elements.
  • Complex types can define elements with children
  • Schema
  • ltxsdelement name"note"gt
  • ltxsdcomplexTypegt
  • ltxsdsequencegt
  • ltxsdelement name"to" type"xsdstring"/gt
  • ltxsdelement name"from" type"xsdstring"/gt
  • ltxsdelement name"heading" type"xsdstring"/gt
  • ltxsdelement name"body" type"xsdstring"/gt
  • lt/xsdsequencegt
  • lt/xsdcomplexTypegt
  • lt/xsdelementgt

23
Another element definition
  • A schema specifies a set of valid top-level
    elements.
  • Complex types can define elements with children
  • Document
  • ltnotegt
  • lttogtSamlt/togt
  • ltfromgtJacklt/fromgt
  • ltheadinggtYour presentationlt/headinggt
  • ltbodygtPlease update section IIlt/bodygt
  • lt/notegt

24
TransportSOAP Overview
25
What is SOAP?
  • SOAP is an XML based protocol to let software
    components and applications communicate using
    standard Internet HTTP
  • SOAP stands for Simple Object Access Protocol

26
SOAP is
  • A communication protocol
  • For communication between applications
  • A format for sending messages
  • Designed to communicate via internet
  • Platform independent
  • Language independent
  • Based on XML
  • Simple and extensible
  • Remote procedure call protocol
  • SOAP will be developed as a W3C standard

27
Why SOAP?
  • SOAP is Transport Protocol independent
  • Transport protocol chosen according to network
    architecture and type of exchange
  • Real time over the internet might use HTTP, where
    a batch processing application might use SMTP
  • SOAP provides a way to communicate between
    applications running on different operating
    systems, with different technologies and
    different programming languages

28
SOAP was Proposed
  • UserLand, Ariba, Commerce One, Compaq,
    Developmentor, HP, IBM, IONA, Lotus, Microsoft,
    and SAP proposed SOAP to W3C, in May 2000
  • The ebXML Plenary voted on 16 February 2001 to
    use SOAP 1.1 and SOAP With Attachments as part of
    the ebXML transport specification
  • Anyone using the transport portion of ebXML will
    therefore be using SOAP

29
SOAP Building Blocks
  • A SOAP message is an ordinary XML document.
  • The XML document contains the following XML
    elements
  • A SOAP envelope, that defines the content of the
    message
  • A SOAP header (optional), that contains header
    information such as credentials
  • A SOAP body, that contains request and response
    information

30
Syntax Rules
  • A SOAP message
  • Must be encoded using XML
  • Must have a SOAP envelope
  • Can have a SOAP header
  • Must have a SOAP body
  • Must use the SOAP envelope namespaces
  • Must use the SOAP encoding namespace
  • Must NOT contain a DTD reference
  • Must NOT contain XML processing instructions

31
SOAP Request Example
  • ltsoapEnvelopegt
  • ltsoapBodygt
  • ltGetPricegt
  • ltItemgtAppleslt/Itemgt
  • lt/GetPricegt
  • lt/soapBodygt
  • lt/soapEnvelopegt

32
SOAP Template
  • ltsoapEnvelopexmlnssoap"http//schemas.xmlsoap.
    org/soap/envelope/soapencodingStyle"http//sc
    hemas.xmlsoap.org/soap/encoding/"gt
  • ltsoapHeadergtlt/soapHeadergt
  • ltsoapBodygtlt/soapBodygt
  • ltsoapFaultgtlt/soapFaultgt
  • lt/soapEnvelopegt

33
The Envelope Element
  • The ltEnvelopegt element must be the root element
    of a SOAP message
  • It defines the XML document as a SOAP message.

34
The Header Element
  • The ltHeadergt element can contain additional,
    application specific information about the SOAP
    message
  • For example, the Header element can contain
    information about the language and currency
    values used in the SOAP message
  • Optionally, the header can carry authorization
    authentication information

35
The Body Element
  • The ltBodygt must be present in a SOAP message
  • It contains the actual SOAP message or payload

36
A SOAP Example 1
  • The SOAP request
  • ltsoapEnvelopegt
  • ltsoapBodygt
  • ltxmlnsm"http//www.stock.org/stock" /gt
  • ltmGetStockPricegt
  • ltmStockNamegtIBMlt/mStockNamegt
  • lt/mGetStockPricegt
  • lt/soapBodygt
  • lt/soapEnvelopegt

37
A SOAP Example 2
  • The SOAP response
  • ltsoapEnvelopegt
  • ltsoapBodygt
  • ltxmlnsm"http//www.stock.org/stock" /gt
  • ltmGetStockPriceResponsegt
  • ltmPricegt34.5lt/mPricegt
  • lt/mGetStockPriceResponsegt
  • lt/soapBodygt
  • lt/soapEnvelopegt

38
SAML Assertion
  • ltSAMLgt
  • ltAssertionIDgt
  • http//www.bizexchange.test/assertion/AE0221
  • lt/AssertionIDgt
  • ltIssuergt URNdns-datewww.bizexchange.test2001
    -01-0319283
  • lt/Issuergt
  • ltConditionsgt
  • ltAudiencegt
  • http//www.bizexchange.test/rule_book.html
  • lt/Audiencegt
  • lt/Conditionsgt
  • ltSubjectgt
  • ltAccountgtAlicelt/Accountgt
  • lt/Subjectgt
  • ltResourcesgt
  • ltstringgthttp//www.elsevier.com/Journal_X/lt/st
    ringgt ltstringgthttps//www.SantaMariaUniversity.ed
    u/SIS/lt/stringgt
  • lt/Resourcesgt
  • lt/SAMLgt

39
Building web services
  • Web services architecture overview

find
2
UDDI Service
Web service requestor
look up web service
bind
3
4
call
Call Web Service
publish
1
Retrieve WSDLDefinition
Register Web Service(at development time)
Web service provider
WSDL Document
40
WSDL
  • Web Services Description Language
  • Language describing what services are available
    and how they can be accessed
  • Messages being sent
  • End-points for message processing
  • WSDL makes it easy for client applications to use
    a web sevice

41
WSDL
  • WSDL document structure
  • ltdefinitionsgt root element
  • lttypes/gt data type definitions
  • ltmessage/gt abstract message definitions
  • ltportType/gt set of abstract operations
  • ltbinding/gt protocols for a portType
  • ltservicegt grouping of related ports
  • ltport/gt network address for a binding
  • lt/servicegt
  • lt/definitionsgt

42
UDDI
  • Universal Description, Discovery and Integration
  • A web services registry system
  • White pages general information
  • Yellow pages service classifications
  • Green pages operation rules

43
UDDI Registry organization
contact phone address e-mail
keyedReference tModelKey keyName keyValue
businessService serviceKey tModelKey name
description bindingTemplates
keyedReference tModelKey keyName keyValue
44
UDDI SOAP API
  • Registry API
  • Find methods
  • find_business
  • find_service
  • find_binding
  • find_tModel
  • Get methods
  • get_businessDetail
  • get_serviceDetail
  • get_bindingDetail
  • get_tModelDetail
  • Inquiry API
  • Save methods
  • save_business
  • save_service
  • save_binding
  • save_tModel
  • Delete methods
  • delete_business
  • delete_service
  • delete_binding
  • delete_tModel

45
The Meteor Channel an example of Web services
46
Meteor in a nutshell
Lender
XML
47
Diagram of Meteor Concept
Web Services HTML
Meteor XML
Student Access Provider Data Provider
48
As implemented ...
Web Services Secure HTML
Meteor Secure XML
Standard Browser
uPortal
Meteor SOAP
Meteor SOAP
Database
49
Data from multiple sources, locations
50
Meteor Channel in the uPortal
51
The End
  • Justin Tilton
  • jet_at_immagic.com
Write a Comment
User Comments (0)
About PowerShow.com