Title: CS556: Distributed Systems
1CS-556 Distributed Systems
SOAP Web Services
- Manolis Marazakis
- maraz_at_csd.uoc.gr
2Evolution of integration methods
Web App. Standards (Web Services)
2001
Web Protocol Standards (HTTP, HTML, XML,
RosettaNet, OBI, cXML, )
Late 1990s
Early 1990s
App. Integration Standards
-1990
Custom static integration
3Web Services
- Machine-to-machine communication
- Description of service semantics metadata
- WSDL Web Service Definition Language
- Discovery of appropriate services
- UDDI Universal Description, Discovery
Integration service - Allow services to be defined, deployed,
manipulated evolved in an automated fashion - Basis for expressing higher-level business logic
- Using flow languages
- Potential
- EDI replacement
- ERP accelerator
- Reduce middleware proliferation
- Improve desktop integration
4Drivers for Web Services
- Microsoft
- .NET, Hailstorm
- Sun
- Sun ONE
- HP
- e-speak
- IBM
- Dynamic e-business
- UN/CEFACT OASIS
- ebXML
- Plus Oracle, Borland,
Submitted to IETF - Nov. 1999 W3C WG -
September 2000
5RPC Interoperability problems
- Naming of communication endpoints
- CORBA IORs
- DCOM OBJREFs
- Support for multiple interfaces per object
- CORBA implicitly, there is 1 interface in an IOR
- DCOM multiple interfaces Iuknown
- Format of parameter values
- CORBA CDR
- DCOM Network Data Representation
6IIOP vs DCOM (I)
7IIOP vs DCOM (II)
8URIs, URLs, URNs
- Universal Resource Identifier
- A formatted string that uniquely identifies a
resource - Uniform Resource Locator
- encode the underlying protocol needed to locate
the resource, as well as its location - http//" lthostgt "" ltportgt ltpathgt "?" ltqrygt
- Uniform Resource Name
- location-independent in no way imply any
protocol or mechanism for locating the resource
being identified - "urn" ltNIDgt "" ltNSSgt
- ltNIDgt namespace
- ltNSSgt namespace-specific string
- urnuuid00000000-0000-0000-C000-000000000046
9Simple Object Access Protocol
- A light-weight XML messaging convention
- exchange of structured typed information
- no application or transport semantics
- XML datagrams -gt extensibility
- Common use RPC-over-HTTP (using XML)
- getStockQuote(), issueQuery(), sendOrder()
- Other uses are possible
- One-way messaging
- Multicast
- The KISS principle
- absolute minimum of functionality
Keep It Simple, Stupid!
10SOAP reference
11UDDI (I)
- Universal Description, Discovery Integration
- An industry initiative for B2B interoperability
- First specs outlined by Ariba, Microsoft IBM
- Ariba, Microsoft, IBM, HP, SAP operator nodes
- Business Registry of Web services
- Allow companies to register their business
services - Accessible via SOAP
- and via browser
- lt businessEntity, businessService,
bindingTemplate, tModel gt - Web service
- a self-describing, self-contained, modular unit
of application logic - provides some business functionality to other
apps - Web services can be mixed matched with other
web services to execute a larger workflow or
business Tx. - WSDL Web Service Definition Language
12UDDI (II)
- XML Schema for UDDI
- ltbusinessEntitygt Business information
- ltbusinessServicegt Service information
- ltbindingTemplategt Binding information
- lttModelgt Information on specifications
- technical fingerprint list of references
- Inquiry API
- Publisher API
- Coping with Failures ?
- inability to predict, detect, or recover from
failures within the systems of the remote partner - Use cached ltbindingTemplategt, retry-on-failure
- Rely on partner to update registry entry
13UDDI (III)
Discrete business roles
The business of e-business services (IBM)
- Lifecycle
- Build
- Deploy
- Run
- Manage
- Publish
- WSDL
- Find
- UDDI
- Bind
- SOAP
Applications will increasingly be based on
compositions of services discovered marshaled
dynamically at runtime.
14UDDI Sample Interaction (I)
lt?xml version'1.0' encoding'UTF-8'?gt
ltEnvelope xmlns'http//schemas.xmlsoap.org/soap/e
nvelope/'gt ltBodygt ltfind_business
generic"1.0" xmlns"urnuddi-orgapi"gt
ltnamegtMicrosoftlt/namegt lt/find_businessgt
lt/Bodygt lt/Envelopegt
15UDDI Sample Interaction (II)
ltbusinessList generic"1.0" operator"Microsoft
Corporation" truncated"false"
xmlns"urnuddi-orgapi"gt ltbusinessInfosgt
ltbusinessInfo businessKey"0076B468-EB27-42E5-AC
09-9955CFF462A3"gt ltnamegtMicrosoft
Corporationlt/namegt ltdescription
xmllang"en"gtEmpowering people through great
software - any time, any place and on any
device lt/descriptiongt ltserviceInfosgt
ltserviceInfo businessKey"0076B468-EB27-42E5
-AC09-955CFF462A3"
serviceKey"8BF2F51F-8ED4-43FE-B665-38D8205D1333"gt
ltnamegtElectronic Business
Integration Serviceslt/namegt
lt/serviceInfogt
. ltserviceInfo
businessKey"0076B468-EB27-42E5-AC09-955CFF462A3"
serviceKey"D2BC296A-723B-4
C45-9ED4-494F9E53F1D1"gt ltnamegtUDDI
Web Serviceslt/namegt lt/serviceInfogt
.
lt/serviceInfosgt lt/businessInfogt
lt/businessInfosgt lt/businessListgt
16UDDI Sample Interaction (III)
ltfind_service generic'1.0' xmlns'urnuddi-orgap
i' businessKey'0076B468-EB27-42E5-AC09-9955
CFF462A3'gt ltnamegtUDDI Web Serviceslt/namegt
lt/find_servicegt
ltserviceList generic"1.0" operator"Microsoft
Corporation" truncated"false"
xmlns"urnuddi-orgapi"gt ltserviceInfosgt
ltserviceInfo businessKey"0076B468-EB27-42E5-AC09
-9955CFF462A3"
serviceKey"D2BC296A-723B-4C45-9ED4-494F9E53F1D1"gt
ltnamegtUDDI Web Serviceslt/namegt
lt/serviceInfogt lt/serviceInfosgt
lt/serviceListgt
17UDDI Sample Interaction (IV)
ltget_serviceDetail generic'1.0'
xmlns'urnuddi-orgapi'gt
ltserviceKeygtD2BC296A-723B-4C45-9ED4-494F9E53F1D1lt/
serviceKeygt lt/get_serviceDetailgt
ltserviceList generic"1.0" operator"Microsoft
Corporation" truncated"false"
xmlns"urnuddi-orgapi"gt ltserviceInfosgt
ltserviceInfo businessKey"0076B468-EB27-42E5-AC09
-9955CFF462A3"
serviceKey"D2BC296A-723B-4C45-9ED4-494F9E53F1D1"gt
ltnamegtUDDI Web Serviceslt/namegt
lt/serviceInfogt lt/serviceInfosgt
lt/serviceListgt
ltfind_business generic'1.0' xmlns'urnuddi-orga
pi'gt lttModelBaggtlttModelKeygtuuid4CD7E4BC-648B
-426D-9936-443EAAC8AE23lt/tModelKeygtlt/tModelBaggt
lt/find_businessgt
18UDDI Sample Interaction (V)
ltserviceDetail generic"1.0" operator"Microsoft
Corporation" truncated"false"
xmlns"urnuddi-orgapi"gt ltbusinessService
businessKey"0076B468-EB27-42E5-AC09-9955CFF462A3"
serviceKey"D2BC296A-723B-4C
45-9ED4-494F9E53F1D1"gt ltnamegtUDDI Web
Serviceslt/namegt ltdescription
xmllang"en"gtUDDI SOAP/XML message-based
programmatic web service interfaces.lt/descript
iongt ltbindingTemplatesgt ltbindingTemplate
bindingKey"A9CAFBE4-11C6-4BFE-90F5-595970D3DE24"
serviceKey"D2BC296A-723B-4C45-9ED4-494F
9E53F1D1"gt ltdescription
xmllang"en"gtProduction UDDI server, Inquiry
interface lt/descriptiongt
ltaccessPoint URLType"http"gthttp//uddi.microsoft.
com/inquirelt/accessPointgt
lttModelInstanceDetailsgt
lttModelInstanceInfo tModelKey"uuid4CD7E4BC-648B-
426D-9936 443EAAC8AE23"gt ltdescription
xmllang"en"gtUDDI SOAP Inquiry
Interfacelt/descriptiongt
lt/tModelInstanceInfogt
lt/tModelInstanceDetailsgt
lt/bindingTemplategt
.
19SOAP Mandatory Features
- Transport Binding
- how to get the message to its destination
- isolates message from transport, for portability
across transports - Message Envelope
- what features services are represented in a
message - as blocks
- who should deal with them
- actor attribute implied semantics
- whether they are optional or mandatory
- mustUnderstand attribute implied semantics
20SOAP Fault Codes
100 Version Mismatch
- The call was using an unsupported SOAP
version. 200 Must Understand
- An XML element was received that
contained an
element tagged with mustUnderstand"true"
that was not understood by
the receiver. 300 Invalid Request
- The receiving application did
not process the request
because it was incorrectly formed or not
supported by the
application. 400 Application
Faulted - The receiving
application faulted when processing the
request. The detail element
contains the application-
specific fault.
21SOAP Optional Features
- Serialisation Mechanism
- to exchange instances of application-defined data
types and directed graphs - uniform model for serializing abstract data
models that cannot be expressed in XML Schema - Section 5 encoding representation of
programming language types - RPC Convention
- how to make calls responses for a particular
type of service
Open issue Security of XML documents ?
22SOAP Example
POST /Accounts/Henrik HTTP/1.1 Host
www.webservicebank.com Content-Length nnnn
Content-Type text/xml charset"utf-8"
SOAPAction "Some-URI" ltSOAPEnvelope
xmlnsSOAP"http//schemas.xmlsoap.org/soap/envelo
pe/" SOAPencodingStyle"http//schemas.xmlsoap
.org/soap/encoding/"gt ltSOAPHeadergt
lttTransaction xmlnst"some-URI"
SOAPmustUnderstand"1"gt lt/tTransactiongt
lt/SOAPHeadergt ltSOAPBodygt
ltmDeposit xmlnsm"Some-URI"gt
ltmamountgt200lt/mamountgt lt/mDepositgt
lt/SOAPBodygt lt/SOAPEnvelopegt
23Alternative SOAP Stacks
- Based on HTTP
- Based on SMTP
- Based on SIP (on top of UDP)
- Support for extension modules
- - encryption
- - digital signatures
- - explicit routing (SOAP-RP)
- - caching
- Modules can address any SOAP processor using the
"actor" attribute - Can be optional or mandatory using the
"mustUnderstand" attribute
24SOAP Message Paths Routing
- SOAP is built on underlying transports, which
have their own concepts of - Message Exchange Pattern
- HTTP request/response
- SMTP one-way
- Message Routing
- HTTP proxies
- DNS lookup
- SMTP DNS MX record, intermediary configuration
- Some applications using SOAP may need to
determine their own concepts of MEP routing - Message path routing has an implied
relationship with the processing model - intra-node processing inter-node processing are
linked.
25SOAP References
- SOAP 1.1 specification
- http//www.w3.org/TR/SOAP
- W3C XML Protocol Activity
- http//www.w3.org/2000/xp/
- SOAP/WebServices Resource Center
- http//www.soap-wrc.com/webservices/
- http//www.webservices.org/
- http//www.soaprpc.com/
- Public SOAP Services listing
- http//www.xmethods.com/
- http//msdn.microsoft.com/msdnmag/issues/0300/soap
/print.asp