Lecture 7 Webservices Fundamentals For WEB IS
Lecture 7 Webservices Fundamentals For WEB IS
Prof S Karume
Web Services - Definition from W3C
“ A Web service is a software system
identified by a URI, whose public
interfaces and bindings are defined and
described using XML. Its definition can
be discovered by other software systems.
These systems may then interact with the
Web service in a manner prescribed by
its definition, using XML based messages
conveyed by internet protocols.”
Service Oriented Architectures
One-way, Component
conversational,
many-to-many
Service Oriented Architectures:
Components
The Service: Whereas a web service is an interface described by a
service description, its implementation is the service. A service is a
software module deployed on network accessible platforms provided by
the service provider. It exists to be invoked by or to interact with a service
requestor. It may also function as a requestor, using other web services in
its implementation.
The Service Description: The service description contains the details of
the interface and implementation of the service. This includes its data
types, operations, binding information, and network location. It could also
include categorization and other meta data to facilitate discovery and
utilization by requestors. The complete description may be realized as a
set of XML description documents. The service description may be
published to a requestor directly or to a discovery agency.
Service Oriented Architectures:
Components
Publish: In order to be accessible, a service needs to publish its
description such that the requestor can subsequently find it. Where it
is published can vary depending upon the requirements of the
application (see Service Publication Stack discussion for more
details)
Find: In the find operation, the service requestor retrieves a service
description directly or queries the registry for the type of service
required (see Service Discovery for more details). The find operation
may be involved in two different lifecycle phases for the service
requestor: at design time in order to retrieve the service's interface
description for program development, and at runtime in order to
retrieve the service's binding and location description for invocation.
Service Oriented Architectures:
Components
Interact: Eventually, a service needs to be invoked. In the interact
operation the service requestor invokes or initiates an interaction
with the service at runtime using the binding details in the service
description to locate, contact, and invoke the service. Examples of
the interaction include: single message one way, broadcast from
requester to many services, a multi message conversation, or a
business process. Any of these types of interactions can be
synchronous or asynchronous.
Web Services –
Architectural Extensions
• Incorporates additional features and functionality by extending
technologies and components defined within the basic architecture,
such as:
• Asynchronous messaging
• Attachment – typical usage : associating binary data with SOAP
messages.
• Caching
• Message exchange pattern (MEP) - Describes a generalized pattern of
message exchange between two services. e.g. : one-way,
request/response, publish/subscribe, and broadcast.
• Reliable message - implementation of Reliable Messaging one MEP is a
series of requests between two nodes with an acknowledgement SOAP
Module.
• Message confidentiality – Can transmit the message via SSL or TLS, or
have a SOAP Module provides for encryption and decryption.
• Message integrity – Can have a SOAP Module use digital signature.
• Session
The Complete Web Services "Stack"
More
mature
technologies
The Complete Web Services "Stack"
XML has been broadly adopted as the basis for Web service message packaging
protocols and SOAP is currently the de facto standard for XML messaging.
Not fully
specified
facts, or assertions,
and
rules that apply to a
particular Web service Input/
Output
rendering
minimum service description
necessary to support Satisfied
interoperable Web services. by
WSDL
The Description Stack
WSDL is an XML document format for describing Web
services as a set of endpoints operating on messages
containing either document-oriented or procedure-
oriented (RPC) messages. The operations and
messages are described abstractly, and then bound to a
concrete network protocol and message format to define
an endpoint. Related concrete endpoints may be
combined into services.
Interface Description maps to the Abstract interface in
WSDL, explained later.
Implementation Description maps to the Deployment
section in WSDL, explained later.
The Description Stack
Policy would be used to describe or point to
documents describing the owning business,
associated products, keywords, taxonomies for the
service, security policies, quality of service attributes,
etc. Policy may be used by the over-arching
concerns: security, quality of service, and
management; as well as higher layers of the
description stack.
The composition and orchestration layers describe
how service-to-service communications,
collaborations, and flows are performed.
The Discovery Stack
WSIL : de-centralized
service discovery method
<xhtml:table><xhtml:tr>
<xhtml:td width="40%">LastName</xhtml:td>
<xhtml:td width="60%">Allen</xhtml:td>
</xhtml:tr></xhtml:table>
How to work on XML
The tree-like structure of XML makes developers
life hard.
In practice there is not a standard way for
editing and analyzing, but the best method
depends on your need. Just choose among:
SAX -> callback-based parser
DOM -> tree representation
XSLT -> “XML to XML” conversion
XPATH -> queries
XML Binding -> transparent conversion to
objects
Simple Object Access
Protocol
SOAP is a technology to support the exchange of
XML-coded messages over a transport protocol,
such as HTTP and SMTP. (wire stack)
SOAP SOAP
POST…
HTTP client HTTP server
Protocols Folding HTTP 1.1 200 OK
<soap:Body>
<getTime>
<location xsi:type="xsd:string">USA</path>
</getTime>
</soap:Body>
Web Service Description
Language
WSDL is a standard format to describe a Web
Service (description stack)
Service name
Link to an other WSIL page
Service location and description
UDDI
UDDI is a complimentary approach for searching
based on a centralized repository.