Docstoc

Web Services

Document Sample
Web Services Powered By Docstoc
					Web Services

   Larry Kerschberg,Co-Director
   E-Center for E-Business
   George Mason University

                                  1
Outline
 Web Services Definition
 Web Services versus Web Sites
 Web Services Protocols and   Standards
 Conclusions




                                           2
Web Services
   Web services are Internet-based applications
    that fulfill a specific task or set of tasks, which
    can be combined with other Web services to
    maintain workflow or perform business
    transactions.
       Airline, hotel and rental car reservation process,
       Loan approval process
 Users access Web services online & offline
  via PCs, cell phones, Personal Digital
  Assistants.
 Programs can also access Web services
  directly.
                                                             3
Web Services (continued)
   Web services communicate with each other:
       Share information about their functions & roles in
        an application’s workflow,
       Publish the inputs they require & outputs they
        generate,
       The result is just-in-time integration of business
        applications.
   Each self-contained business service
    becomes an application that will easily
    integrate with other services (from the same
    or different companies) to create a complete
    business process.
                                                             4
  Web Sites and Web Services
                        Web Site
     HTTP                    Web
                            Access        Business
   Internet      HTTP                                   Database
                             User          Logic
                           Interface

                                          Web Service

Computer
Program SOAP          Internet     SOAP     Business
                                                          Database
                                             Logic

HTTP: Hypertext Transfer Protocol
SOAP: Simple Object Access Protocol                                5
  Travel Web Service Portal
                                                Travel Portal
                                                 Web Site
     HTTP
                                                     Web
                                           HTTP     Access
               Internet                              User
                                           SOAP    Interface

        SOAP                   SOAP              SOAP
Airline Service           Hotel Service           Car Rental Service

 Business                  Business                Business
            Database                  Database                Database
  Logic                     Logic                   Logic

                                                                   6
            Web Services, XML and Metadata
                                                  GetaLoan.com



                      Delivery of Service
                               =
                      Approval Or Denial
                                                                                         Delivery of Service
                                                                                                  =
                                                                                         Credit Verification
Online Loan Applicant


                                                                                                               Credit Reporting
                                                                                                                   Service
                                    XML                                              XML
                                   Server                                           Server



                                                           Internet

                                                                                                  Delivery of Service
                                                                      Meta                                 =
                                                                      Data                   Loan approval & procurement
              Delivery of Service           Univers
                       =                      al
            Loan insurance approval         Busines
                                               s                           XML
                                            Registry                     Document
                                    XML                                      s       XML
                                   Server                                           Server

                                                        Web Services                                              Financial
                                                       Meta Repository                                           Institutions
     Loan Insurance                                       (WSMR)
       Company


                                                                                                                                7
Web Service Standards
   Simple Object Access Protocol (SOAP)
       http://www.w3.org/TR/SOAP/
   Web Services Description Language (WSDL)
       http://msdn.microsoft.com/xml/general/wsdl.asp
   Universal Description, Discovery and
    Integration (UDDI)
       http://www.uddi.org




                                                         8
Simple Object Access
Protocol (SOAP)
   SOAP is an XML-based messaging
    framework
       Designed to exchange data over the Internet
       Can send request, reply messages or entire
        documents.
       Neutral with respect to Operating System.
   SOAP and XML provide a means for two or
    more portals, marketplaces or trading
    partners to agree on common data exchange
    services for “exposing” services to the Web
    for creating distributed the “virtual enterprise.”

                                                         9
 Discovering SOAP Services
1. Enterprise   A uses URL
   provided by Enterprise B
   to get list of published
   services.
2. Enterprise A downloads
   the XML schemas (using
   WSDL) describing
   services message formats.
3. Enterprise A formats and
   sends XML message via
   SOAP to Enterprise B
4. Enterprise B responds via
   SOAP, which A interprets
   using XML Schema.
                               10
SOAP Message Format
 SOAP supportstwo basic XML
 message formats
   Self-describing EAI (Enterprise Application
    Integration) and EDI (Electronic Data
    Interchange).
   Remote procedure call (RPC) style
    interactions that model object method
    invocation and parameter passing.


                                              11
SOAP Message Format
   Envelope
       Marks the start and end of a   Envelope
        SOAP message.
   Header (optional)                    Header
       Used to include RPC style
        interaction.
       Can contain no header or
        several headers.                 Body
   Body
       Contains the actual message
        or document being sent.
   SOAP message elements
    are defined using schemas
    and qualified using
    namespaces.                                   12
SOAP Envelope
 SOAP Envelope defines aframework for
 describing message contents and how to
 process it.
   Rules   for encoding the data transfer
   Agree by downloading the same XML
    schema.
   http://schemas.xmlsoap.org/soap/envelope/

   http://schemas.xmlsoap.org/soap/encoding/



                                           13
SOAP Header
 Each header must be defined within an
  associated XML schema,
 Allow features such as security, transactions,
  and quality of service attributes to be
  specified.
 Must be understood by both parties,
 Allows consumers and publishers to
  negotiate agreement on support of a given
  header or a set of headers.


                                               14
SOAP Body
 Contains application-defined XML        data
 being exchanged in message.
   Eithera single, self-describing structure, or
   Remote Procedure Call (RPC) interface
    with method name and typed parameters.
 Next slide showsan example of a stock
 quote request and response.


                                                 15
  SOAP Example
Request:                       Response:
<SOAP-ENV: Envelope>          <SOAP-ENV: Envelope>
…                             …
   <SOAP-ENV: Body>              <SOAP-ENV: Body>
   <m:GetLastTradePrice          <m:GetLastTradePriceResponse
   xmlns:m-”Some-URI”>           xmlns:m-”Some-URI”>
        <symbol>MSFT</symbol>         <Price>63.00</Price>
   </m: GetLastTradePrice>       </m: GetLastTradePriceResponse>
   </SOAP-ENV:Body>              </SOAP-ENV:Body>
</SOAP-ENV: Envelope>         </SOAP-ENV: Envelope>




                                                               16
Web Services Description
Language (WSDL)
 WSDL is a form of XML Schema to define the
  XML message, operation and protocol
  mapping of a web service accessed using
  SOAP or another XML protocol.
 WSDL defines Web services as “end points”
  that operate on XML messages.
 Both the messages and the operations on the
  messages are defined abstractly and then
  mapped to multiple physical implementations.
 Current mappings include SOAP 1.1, HTTP
  GET/POST and MIME.
                                             17
    WSDL Specification
   Proxy Code                               Definition List
       A definition of message types         Proxy code:
        and operations in the abstract,
                                              • Message type
   Binding Information                       • Abstract interface
       A definition that maps the              (port type)
        abstract definitions onto
        concrete transports and               Binding information:
        network end points.                   • Transport
   Service Definition                        • Port
       A definition that maps
        bindings to ports and includes
        extensibility, e.g., attributes or    Service definition:
        properties for quality of             • Binding/port
        service agreements.                   • Extensibility


                                                                     18
IONA’s XML Bus Web
Services
 Dynamic WSDL Test Facility    (several
 web services)
   http://www.xmlbus.com:9010/WSDLClient/
   WSDLDynamicTestClient.html
 WSDL Service Description
   http://www.xmlbus.com:9010/xmlbus/contai
   ner/Converter/ConverterService/Converter
   Port


                                              19
Convert Inches to Millimeters
   XML Query
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema -instance">
  <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m1:inchToMM xmlns:m1="urn:target-converter-service">
       <param0 xsi:type="xsd:float">1.0</param0>
    </m1:inchToMM>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

   XML Response
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema -instance">
  <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <m1:inchToMMResponse xmlns:m1="urn:target-converter-service">
       <return xsi:type="xsd:float">25.4</return>
    </m1:inchToMMResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>




                                                                                       20
UDDI and the Protocol Stack
  Universal Service Interoperability Stack
            (layer not yet defined)
 Universal Description, Discovery Integration
                     (UDDI)
       Simple Object Access Protocol
                    (SOAP)
        eXtensible Markup Language
                      (XML)
         Common Internet Protocols
                (HTTP, TCP/IP)
                                                21
UDDI - Universal Description,
Discovery and Integration
 Goalis to enable the interoperability of
 web services
   Standards-based   specifications for service
    description and discovery
   Shared operation of a business registry on
    the web
 Partnership among industry and
 business leaders

                                               22
     How UDDI v1 Works

                                                                      4.
1.                SW companies, standards
                  bodies, and programmers
                  populate the registry with
                  descriptions of different types
                  of services
                                                                      Marketplaces, search
                                                                      engines, and business
                                                                      apps query the registry to
2.                                                                    discover services at other
                                                                      companies
                             UDDI Business Registry

                               Business         Segrvice Type
                                                                           5.
Businesses                   Registrations       Reistrations
populate
the registry
                       3.
                            UBR assigns a programmatically unique
with                                                                       Business uses this
                            identifier to each service and business
descriptions of                                                            data to facilitate
                            registration
the services                                                               easier integration
they support                                                               with each other over
                                                                           the Web

                                                                                           23
White Pages Yellow Pages
 Business Name                          Business categories
 Text Description
                                             3 standard
       list of multi-language text
        strings                               taxonomies in V1
                                                  Industry: NAICS
   Contact info
                                                   (Industry codes - US
       names, phone numbers,
                                                   Govt.)
        fax numbers, web sites…
                                                  Product/Services:
   Known Identifiers                              UN/SPSC (ECMA)
       list of identifiers that a
        business may be known                     Location:
        by - DUNS, Thomas,                         Geographical
        other                                      taxonomy



                                                                      24
Green Pages
 Businesses describe how other
 businesses will “do e-commerce”:
   Nested   model
     Business processes
     Service descriptions

     Binding information

   Programming/platform/implementation
    agnostic
   Services can also be categorized



                                          25
Service Type Registration
   Pointer to the namespace where service type
    is described
       What programmers use to understand how to use
        the service
 Identifier for who published the service
 Identifier for the service type registration
       called a tModelKey
       Used as a signature by web sites that implement
        those services


                                                          26
    Business Registration

                                                     Contact
                                                    Contact
 XML document           businessEntity               Phone
                                                    Phone
                                                      Address
                                                    Address
                          businessKey                 Email
 Created by end-user     name
                                                    Email

  company                 URL
                          description
                                                 businessService
                                               businessService
 Can have multiple       contacts                serviceKey
                                                Key
                          businessServices        tModelKey
                                                Name
  service listings        identifierBag           Name
                                                Description
                          categoryBag             Description
                                                BindingTemplates
                                                  BindingTemplates
 Can have multiple
                                             keyedReference
  taxonomy listings                           keyedReference
                                              tModelKey
                                               tModelKey
                                              keyName
                         keyedReference
                        keyedReference         keyName
                                              keyValue
                          tModelKey            keyValue
                         tModelKey
                          keyName
                         keyName
                          keyValue
                         keyValue
 From www.uddi.org
                                                                27
        Example of a Registration
                                                 Peter Smythe
     businessEntity                                 872-6891
       TB993…                                       4281 King’s Blvd, Sydney, NSW
       Harbour Metals                               Peter@harbourmetals.co.au
       www.harbourmetals.co.au
       “Serving Inner Sydney Harbour for …            businessService
                                                     businessService
       contacts                                        23T701e54683nf…
                                                     Key
       businessServices                                Online
                                                     Name catalog
       identifierBag                                   “Website where you can …
                                                     Description
       categoryBag                                     BindingTemplates
                                                     BindingTemplates

                                             BindingTemplate
keyedReference                                5E2D412E5-44EE-…
 EE123…             keyedReference            http://www.sydneynet/harbour…
                                              tModelInstanceDetails
 NAICS               DFE-2B…
 02417               DUNS
                                             tModelInstanceInfo
                     45231
                                               4453D6FC-223C-3ED0…
                                               http://www.rosetta.net/catalogPIP

                 tModelKeys
      From www.uddi.org
                                                                                   28
 UDDI and SOAP

                      UDDI Registry
        User          Node
       UDDI
    SOAP Request        HTTP        SOAP
                        Server    Processor
       UDDI
   SOAP Response              UDDI
                         Registry Service


 Create, View,           B2B Directory
 Update, and Delete
 registrations        Implementation-
                      neutral



From www.uddi.org
                                            29
Registry APIs (SOAP Messages)
  Inquiry API                        Publishers API
        Find things                      Save things
                                               save_business
             find_business
                                               save_service
             find_service                     save_binding
             find_binding                     save_tModel
             find_tModel
                                          Delete things
        Get Details about                     delete_business
         things                                delete_service
             get_businessDetail               delete_binding
             get_serviceDetail                delete_tModel
             get_bindingDetail           security…
             get_tModelDetail                 get_authToken
                                               discard_authToken
 From www.uddi.org
                                                                    30
UDDI Information Model




                         31
  Web Service Discovery and
  Interaction

UDDI Repository   WSDL


                  SOAP               Integrated
                           Wrapper
                  Server             Application




                  WSDL
    SOAP
    Client
                  SOAP               Integrated
                           Wrapper
                  Server             Application




                                             32
E-Business Standards
 Electronic Business XML          (ebXML)
   http://www.ebxml.org/
       Local Web Site
 RosettaNet
   http://www.rosettanet.org/
       Local Partner Interface Processes




                                             33
Electronic Business XML
(ebXML)
 International initiative established by the
  United nations and OASIS to promote global
  standards to exchange business data.
 Wants to promote a global e-business
  marketplace, regardless of geographic or
  political boundaries.
 ebXML has several models and mappings:
       Business Process and Information Model,
       Model maps to XML documents,
       Defines requirements for applications that process
        the documents and exchange them among trading
        partners.
                                                         34
ebXML (continued)
   The ebXML architecture defines:
       Business processes and their associated
        messages and content,
       A registry and discovery mechanism for publishing
        business process sequences and related
        message exchanges,
       Company profiles,
       Trading partner agreements,
       A uniform message transport layer which is
        mapped to SOAP with multipart MIME
        attachments.


                                                        35

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:2
posted:3/22/2012
language:
pages:35
yaohongm yaohongm http://
About