Web Services (adapted from Erdogan Dogdu's presentation) - PowerPoint PPT Presentation

About This Presentation
Title:

Web Services (adapted from Erdogan Dogdu's presentation)

Description:

POST /WebCalculator/Calculator.asmx HTTP/1.1. Content-Type: text/xml ... Type:text/xml. Content-Length: 391 ?xml version='1.0'? soap:Envelope ... soap:Body ... – PowerPoint PPT presentation

Number of Views:72
Avg rating:3.0/5.0
Slides: 23
Provided by: lambd
Learn more at: https://lambda.uta.edu
Category:

less

Transcript and Presenter's Notes

Title: Web Services (adapted from Erdogan Dogdu's presentation)


1
Web Services(adapted from Erdogan Dogdu's
presentation)
  • Leonidas Fegaras

2
What are Web Services?
  • Services available via the Web
  • Mostly for application-to-application
    communication
  • Enables business-to-business transactions
  • Examples
  • stock quote service
  • weather service
  • map service
  • Web search service
  • Based on XML
  • SOAP Simple Object Access Protocol
  • WSDL Web Service Description Language
  • UDDI Universal Description, Discovery, and
    Integration

3
SOAP
  • A lightweight protocol for exchanging information
    in a distributed, heterogeneous environment
  • Enables cross-platform interoperability
  • programming language neutral
  • hardware independent
  • protocol independent
  • Works over existing Internet infrastructure
  • Builds on XML standards
  • Defines
  • message format
  • data encoding
  • headers for sending messages receiving responses

4
(No Transcript)
5
(No Transcript)
6
(No Transcript)
7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
WSDL Web Services Description Language
  • XML schema for describing Web Services
  • Service interface definition
  • abstract semantics for Web Service
  • Service implementation definition
  • concrete end points and network addresses where
    Web Service can be invoked
  • Used primarily (although not exclusively) to
    describe SOAP services
  • Describes four critical pieces of data
  • Interface information describing all publicly
    available functions
  • Data type information for all message requests
    and message responses
  • Binding information about the transport protocol
    to be used
  • Address information for locating the specified
    service

12
Main Structure
  • ltdefinition namespace http/ gt
  • lttypegt xschema types lt/typegt
  • ltmessagegt lt/messagegt
  • ltportgt a set of operations lt/portgt
  • ltbindinggt communication protocols lt/bindinggt
  • ltservicegt a list of binding and ports lt/servicegt
  • ltdefinitiongt

13
WSDL Parts
  • lttypesgt define types used in message declaration
  • XML Schema must be supported by any vendor of
    WSDL conformant products
  • The ltmessagegt element defines the data elements
    of an operation
  • each message may consist of one or more parts
  • similar to the parameters of a function call in a
    traditional programming language
  • The ltportTypegt defines a web service, the
    operations that can be performed, and the
    messages that are involved
  • defines the connection point to a web service, an
    instance of ltportTypegt.
  • similar to a function library in a traditional
    programming language
  • each operation can be compared to a function in a
    traditional programming language

14
Example HelloService.wsdl
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • ltdefinitions name"HelloService"
  • targetNamespace"http//www.ecerami.com/wsdl/He
    lloService.wsdl"
  • xmlns"http//schemas.xmlsoap.org/wsdl/"
  • xmlnssoap"http//schemas.xmlsoap.org/wsdl/soa
    p/"
  • xmlnstns"http//www.ecerami.com/wsdl/HelloSer
    vice.wsdl"
  • xmlnsxsd"http//www.w3.org/2001/XMLSchema"gt
  • ltmessage name"SayHelloRequest"gt
  • ltpart name"firstName" type"xsdstring"/gt
  • lt/messagegt
  • ltmessage name"SayHelloResponse"gt
  • ltpart name"greeting" type"xsdstring"/gt
  • lt/messagegt
  • ltportType name"Hello_PortType"gt
  • ltoperation name"sayHello"gt
  • ltinput message"tnsSayHelloRequest"/gt
  • ltoutput message"tnsSayHelloResponse"/gt
  • lt/operationgt
  • lt/portTypegt

15
Example (cont.)
  • ltbinding name"Hello_Binding" type"tnsHello_Port
    Type"gt
  • ltsoapbinding style"rpc"
  • transport"http//schemas.xmlsoap.org/soa
    p/http"/gt
  • ltoperation name"sayHello"gt
  • ltsoapoperation soapAction"sayHello"/gt
  • ltinputgt
  • ltsoapbody
  • encodingStyle"http//schemas.xmlso
    ap.org/soap/encoding/"
  • namespace"urnexampleshelloservic
    e"
  • use"encoded"/gt
  • lt/inputgt
  • ltoutputgt
  • ltsoapbody
  • encodingStyle"http//schemas.xmlso
    ap.org/soap/encoding/"
  • namespace"urnexampleshelloservic
    e"
  • use"encoded"/gt
  • lt/outputgt
  • lt/operationgt
  • lt/bindinggt

16
Example (cont.)
  • ltservice name"Hello_Service"gt
  • ltdocumentationgtWSDL File for
    HelloServicelt/documentationgt
  • ltport binding"tnsHello_Binding"
    name"Hello_Port"gt
  • ltsoapaddress
  • location"http//localhost8080/soap/s
    ervlet/rpcrouter"/gt
  • lt/portgt
  • lt/servicegt
  • lt/definitionsgt

17
WSDL Invocation Tools
  • You can use any SOAP method to call HelloService
  • Using the GLUE tool
  • invoke URL method arg1 arg2 arg3...
  • To invoke the HelloService with GLUE
  • place the HelloService.wsdl file within a
    publicly available directory
  • issue the command
  • invoke http//localhost8080/wsdl/HelloService.wsd
    l sayHello World
  • GLUE will
  • download the specified WSDL file
  • invoke the sayHello method
  • pass World as a parameter
  • Server response
  • result Hello, World!

18
UDDI
  • UDDI Universal Description, Discovery, and
    Integration
  • Industry initiative to address discovery
  • a registration database for Web Services
  • Specifications
  • schema for service providers and descriptions
  • API for publishing and searching
  • developed on industry standards (XML, HTTP,
    TCP/IP, SOAP)
  • applies to both XML and non-XML services
  • Implementation
  • public and private instances of specification

19
Providers, Services and Bindings
  • Providers
  • Examples Accounting Department, Corporate
    Application Server
  • Name, Description, Contact Information
  • Categorization and Identification Information
  • Services
  • Examples Purchase Order services, Payroll
    services
  • Name, Description(s)
  • Categorization Information
  • Bindings
  • Description(s), access points, parameters
  • Examples Access Point (http//...) for Web
    Service

20
Features
  • Neutral in terms of protocols
  • as a registry, it can contain pointers to
    anything
  • Can search by business, service, Web Service,
    binding
  • Usage of Globally Unique Identifiers (GUIDs)
  • Specification allows public and private nodes
  • Delineation between interface and implementation

21
tModel
  • lttModelgt represents meta-data and interfaces

lttModel xmlns"urnuddi-orgapi"
tModelKey"UUIDAAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAA
AA"gt ltnamegtmicrosoft-comcreditchecklt/namegt
ltdescription xmllang"en"gtCheck credit
limitslt/descriptiongt ltoverviewDocgt
ltoverviewURLgthttp//schema.com/creditcheck.wsdl
lt/overviewURLgt lt/overviewDocgt
ltcategoryBaggt ltkeyedReference
tModelKey"UUIDCD153257-086A-4237-B336-6BDCBDCC66
34" keyName"Consumer credit gathering or
reporting services" keyValue"84.14.16.01.0
0"/gt ltkeyedReference
tModelKey"UUIDC1ACF26D-9672-4404-9D70-39B756E62A
B4" keyName"types" keyValue"wsdlSpec"/gt
lt/categoryBaggt lt/tModelgt
22
bindingTemplate
  • A bindingTemplate represents data and
    implementation details

ltbindingTemplate serviceKey"33c3d124-e967-4ab1-8f
51-d93d95fac91a" bindingKey"48f2bc6b-a6de-4be8-9f
2b-2342aeafaaac"gt ltaccessPoint
URLType"http"gt http//localhost/HelloWorld/Serv
ice1.asmx lt/accessPointgt lttModelInstanceDetail
sgt lttModelInstanceInfo tModelKey"uuid64c7
56d1-3374-4e00-ae83-ee12e38fae63/gt
lt/tModelInstanceDetailsgt lt/bindingTemplategt
Write a Comment
User Comments (0)
About PowerShow.com