Chapter 2:Basic Standards for Web Services
Service-Oriented Computing: Semantics, Processes, Agents– Munindar P. Singh and Michael N. Huhns, Wiley, 2005
Chapter 2 2Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Highlights of this Chapter
eXtensible Markup Language (XML) Simple Object Access Protocol
(SOAP) Web Services Description
Language (WSDL) Directory Services Universal Description, Discovery,
and Integration (UDDI)
Chapter 2 3Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Standards for Web Services
BPEL4WSOWL-S Service
Model
ebXMLCPA
Process and workflow orchestrations
QoS: Service descriptions and bindings
Contracts andagreements
XLANG
WSCL
WSDLebXML
CPP
ebXMLBPSS
XML, DTD, and XML Schema
HTTP, FTP, SMTP, SIP, etc.
SOAPebXML
messaging
OWL
UDDIebXML
Registries
WSCLWSCI
WS-Coordination
WS-AtomicTransaction and WS-BusinessActivity
OWL-S Service Grounding
OWL-S Service Profile
BTP
BPML
Discovery (not selection)
Messaging
Transport
QoS: Conversations
QoS: Choreography
QoS: Transactions
Encoding
WS-Policy
WS-Security
WS-Reliable Messaging
PSL
RDF
Chapter 2 4Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Markup History None, e.g., CSV Ad hoc tags SGML (Standard Generalized Markup L):
complex, few reliable tools HTML (HyperText ML): simple, unprincipled,
mixes structure and display XML (eXtensible ML): simple, yet extensible
subset of SGML to capture new vocabularies Machine processible Generall, comprehensible (easier debugging),
though verbose and arcane
Chapter 2 5Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
XML Basics and Namespaces
<?xml version="1.0"?> <!– not part of the document per se --><arbitrary:elemZ xmlns="http://one.default.namespace/if-
needed"xmlns:arbitrary="http://wherever.it.might.be/arbit-ns"
xmlns:random="http://another.one/random-ns"> <arbitrary:elemA attr1="v1" attr2="v2">
Optional text also known as PCDATA<arbitrary:elemB attr1="v1" attr2="v2" />
</arbitrary:elemA><random:simpleElem/> <!– abbreviate start and end --><random:elemA attr3="v3"/> <!– cf arbitrary:elemA -->
</arbitrary:elemZ>
Chapter 2 6Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
XML Schema Grammar (data definition language) for
specifying valid documents Uses same syntax as regular XML
documents: verbose and difficult to read Provides local scoping of subelement names Incorporates namespaces Types
Primitive (built-in): string, integer, float, date, … simpleType constructors: list, union Restrictions: intervals, lengths, enumerations,
regex patterns, Flexible ordering of elements
Key and referential integrity constraints
Chapter 2 7Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Web Services: Basic Architecture
ServiceBroker
ServiceProvider
ServiceRequesto
r
Bind or invoke(SOAP)
Find or discover(UDDI)
Publish or announce(WSDL)
Registry; well-known
Not well-known
Chapter 2 8Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Basic Profile (BP 1.0)
Standard of standards: SOAP 1.1 HTTP 1.1 XML 1.0 XML Schema Parts 1 and 2 UDDI Version 2 WSDL 1.1
Web Services Interoperability Organization (WS-I)
Newer versions in progress
Chapter 2 9Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Describing a Service
Namee.g., GetTemperature
Types of Input Parameterse.g., (String, String)
Types of Output Parameterse.g., Integer
Chapter 2 10Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
SOAP (Simple Object Access Protocol)
Used to exchange messages via HTTP, SMTP, and SIP (Session Initiation Protocol for Internet telephony)
Originally designed for remote-procedure calls (RPC)
Works through firewalls on port 80 Character-based, so easy to encrypt/decrypt
and thus easy to secure Inefficient due to character, not binary, data
and large headers Does not describe symmetric or multiparty
interactions
Chapter 2 11Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Ex. SOAP Request
POST /temp HTTP/1.1Host: www.socweather.comContent-Type: text/xml; charset="utf-8"Content-Length: xxxSOAPAction: "http://www.socweather.com/temp"
<!-- Above: HTTP headers and a blank line. --><!—These comments and below: an XML document --><?xml version=“1.0”?><env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <env:Body> <m:GetTemp xmlns:m="http://www.socweather.com/temp.xsd"> <m:City>Honolulu</m:City> <m:When>now</m:When> </m:GetTemp> </env:Body></env:Envelope>
Chapter 2 12Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Ex. SOAP Response
HTTP/1.1 200 OKContent-Type: text/xml; charset="utf-8"Content-Length: xxxSOAPAction: "http://www.socweather.com/temp"
<?xml version="1.0"?><env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
<env:Body> <m:GetTempResponse
xmlns:m="http://www.socweather.com/temp.xsd"> <m:DegreesCelsius>30</m:DegreesCelsius> </m:GetTempResponse> </env:Body></env:Envelope>
Chapter 2 13Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
WSDL: Web Services Description Language
Describes a programmatic interface to a Web service, including Definitions of data types Input and output message formats The operations provided by the service Network addresses Protocol bindings
Chapter 2 14Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
WSDL Data Model
definitions targetNamespace=thisNamespace xmins:tns=thisNamespace
types message name=in message name=out
portType name=foo operation input message=tns:in output message=tns:out
binding name=foobar type=tns:foo [binding information]
service name=foobar Service
Port name=foobarPort binding=tns:foobar [endpoint information]
Types contains data type definitionsMessages consist of one or more parts
A portType describes an abstract setof operations
A binding describes a concrete set offormats and protocols for the fooportTypes
A port describes an implementationof the foobar binding
Chapter 2 15Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Directory Services Support discovery: enable applications,
agents, Web service providers, Web service requestors, people, objects, and procedures to locate each other White pages: entries found by name Yellow pages: entries found by attributes
A basic directory might be a simple database (passive) or a broker/facilitator (active, that provides alerts and recruits participants)
UDDI: both white pages and yellow pages, but passive
Chapter 2 16Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
UDDI: Universal Description, Discovery, and Integration
UDDI is itself a Web service that is based on SOAP and XML
UDDI registers tModels: technical descriptions of a
service’s behavior businessEntities: describes the
specifications of multiple tModels
Chapter 2 17Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Yellow, Green, and White Pages in UDDI
-businessKey : string(idl)-name : string(idl)-description : string(idl)-URL : string(idl)-contacts : contact-businessServices : businessService-identifierBag : keyedReference-categoryBag : keyedReference
businessEntity
1
*
-tModelKey : string(idl)-keyName : string(idl)-keyValue : string(idl)
keyedReference
-serviceKey : string(idl)-tModelKey : string(idl)-name : string(idl)-description : string(idl)-bindingTemplates
businessService
-phone : string(idl)-address : string(idl)
contact
businessEntity: Information about theparty who publishes information about
a service
businessService: Descriptiveinformation about a particular family of
technical services
bindingTemplate: Technicalinformation about a service entry point
and implementation specs
tModel: Descriptions of specificationsfor services or value sets. Basis for
technical fingerprints
businessEntities containbusinessServices
businessServices containbindingTemplates
bindingTemplates contain referencesto tModels. These references
designate the interface specificationsfor a service
Chapter 2 18Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Data Model for UDDI
Chapter 2 19Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
WSDL UDDI
<import>
<port>
<port>
BusinessEntity
BusinessService
BindingTemplate
BindingTemplate
Service Implementation
UDDI
<service>
Service Interface
<types>
<message>
<portType>
<binding>
tModel
WSDL
Chapter 2 20Service-Oriented Computing: Semantics, Processes, Agents - Munindar Singh and
Michael Huhns
Chapter 2 Summary
The main triad of Web services standards Bring together well-known ideas from
distributed computing SOAP: object access and messaging WSDL: based on CORBA IDL UDDI: based on directories
Provide necessary functionality for interoperation
Are complicated in their details Meant for tool vendors, not programmers Increasingly hidden by tools