Professional Documents
Culture Documents
Consumer Producer
MESSAGE
Service oriented architecture is intended to define loosely coupled and interoperable
services/applications and to define a process for integrating these interoperable components.
In SOA, the system is decomposed into a collection of network-connected components.
Applications and resources within a service oriented architecture should not be built as a
tightly coupled monolithic model. rather these applications are composed dynamically from
the deployed and available services in the network.
These services are dynamically discovered and bound together in a loosely coupled manner.
This dynamic construction allows the system to quickly respond to new business
requirements.
Service Oriented Architecture
Most commonly understood SOA architectures are WEB and WEB SERVICES.
Web:
web is a medium for message exchange between consumer and producer using a
common, well understandable and interoperable data model, HTML/XHTML.
Consumer(BR Producer(WE
OWSER) BSERVER)
MESSAGE
Html/xhtml
The above model was adequate for the common user agent based interaction. But when the
interaction pattern becomes complex such as business to business the above architecture needs
to be modified to adapt to any user agent or applications.
Solution is web services
Web service architecture extends the above interaction pattern further by adding the power
and expressiveness of XML.
Service Oriented Architecture
Any
Any producer
consumer
MESSAGE
XML
Service
Registry
description
discover publish
service
service service
consumer producer
MESSAGE Service
XML description
Service Oriented Architecture
A web service is a software system identified by a URI whose public interfaces are defined and
described using XML.
Other systems can interact with these systems using XML messages.
Web Service Architecture
XML RELATED TECHNOLOGIES AND THEIR RELEVANCE TO WEB SERVICES:
Web service agents(requesters and providers) exchange information in the form of messages.
These messages are defined in terms of XML Infoset, XML schema and XML namespace
XML MESSAGES AND ENVELOPING:
Here we look at how XML Web service messages are packaged and enveloped. The most
notable mechanism available is SOAP.
SOAP:
SOAP is a simple and lightweight XML Based mechanism for creating structured data packages
that can be exchanged between network applications.
Soap specification will be consisting of following components:
an envelope that defines a framework for describing message structure.
A set of encoding rules for expressing instances of application-defined data types
A convention for representing remote procedure calls and responses
A set of rules for using SOAP with HTTP
MESSAGE EXCHANGE PATTERNS such as request response, one way and peer to peer
conversations.
Web Service Architecture
SOAP Header
SOAP BODY
Web Service Architecture
Soap Soap
SOAP message SOAP Service
Request intermedia
message
Soap interme end
er ry
message diary point
SOAP header blocks carry information such as security, transactional information, correlation
and so on.
These intermediaries may act on these header blocks, add more blocks, change them or leave
them untouched.
These header blocks can be targeted to some intermediary or final receiver by the use of ROLES
attributes. The value of the roles attribute can be an address or a standard role name as defined
by the soap specification which are
next each SOAP intermediary and the ultimate receiver must act on this role
none SOAP nodes must not act in this role
ultimate receiver the ultimate receiver must act in this role
Web Service Architecture
SOAP Features:
Features are reliability, security, correlation, routing and message exchange patterns such as
request/response, one way and peer to peer conversations.
SOAP feature has the following characteristics:
A unique name used to identify the feature and its properties.
A set of properties associated with a feature that can be used to control, constrain or identify
a feature.
Implementation of these features:
SOAP header blocks: SOAP HEADER BLOCKS are used to specify a feature.
SOAP binding protocol: in this case the features are directly implemented in the protocol
binding level.
Web Service Architecture
SOAP MODULES:
Combined syntax and semantics of a set of SOAP headers are known as a SOAP module. a SOAP
module realizes one or more SOAP features.
Web Service Architecture
A service description is a set of documents that collectively describe the interface to a service(
service expectations and functionalities).
In addition to the interface definition, it must describe the semantics of a service such as the
relationship between the operations on a service, the meaning of an interface, or the basic
behavior of an operation.
A service must provide service descriptions with the details on its utilization syntax and
semantics.
Web Service Architecture
Google Search
uses uses
provides interact
MY SEARCH uses News Service
Requester
interact service Description
provides
interact
News Service
Web Service Architecture
In the example a search engine service is exposing some of its capabilities to the external world
so that its clients can understand the syntax and semantics of that service and interact with the
service.
This service may then interact with other services using the description provided by those
services such as other search engines or news services.
Web service description language:
Quick overview of WSDL 1.1
WSDL is an XML infoset based document, which provides a model and XML format for
describing web services. This enables services to be described and enables the client to
consume these services in a standard way without knowing much on the lower level protocol
exchange binding including SOAP and HTTP.
Web Service Architecture
ABSTRACT
Types
Messages
PortType
PortType
definition
Binding
Binding
Port1<address>
Port1<address>
service
Web Service Architecture
As shown in the figure,
WSDL document can be divided into abstract definitions and agreed upon definitions.
Abstract section defines the SOAP messages in a platform independent language and a neutral
manner.
A message component describes the abstract format of a particular message that a Web service
sends or receives. The format of a message is typically described in terms of XML element
information items and attribute information items.
A message binding describes how the abstract content is mapped into a concrete format.
Abstract service definition components are Types, Messages, Operations, PortType and Binding.
Agreed upon definition components are service, port and binding. Agreed upon definitions
specify the wire message serialization, transport selection and other protocol implementation
aspects.
There can be two types of message encoding
Literal encoding
SOAP encoding
literal encoding specifies that the messages will be constructed according to the XML schema
SOAP encoding specifies that the messages are encoded using SOAP encoding rules.
Web Service Architecture
At the abstract level, the Types Component is a container for data type definition(describes the
elements in XML document)
A port type is an abstract set of operations(actions supported by the service) supported by one
or more endpoints.
A binding component described a concrete binding of a port type component and associated
operations to a particular concrete message format and transmission protocol.
A binding operation component describes a concrete binding for a particular operation of a port
type to a particular concrete message format.
A service component describes collection of related endpoints.
A port component defines the particulars of a specific end-point at which a given service is
available.
Web Service Architecture
Another important concept in WSDL are the message transfer format, messages can be
transferred as document or rpc parameters.
Document means that the message part is the body of the message, while RPC means that the
parts are just parameters of the call with specific signatures that are wrapped in an element.
Quick overview of WSDL 1.2
One of the major semantic clarifications we can discuss is regarding the concept of the service.
We will start with the concept of a resource
A resource is anything that can be addressable by a URI. These resources can be software
applications, hardware abstractions, web resources. every resource can be logically represented
by a set of interfaces such as manageability interfaces, operational interfaces and other such
interfaces.
A service is then treated as a realization of a single interface of a resource.
Web Service Architecture
abstract
types
messages
Interface A
Interface B
resource
endpoint endpoint
endpoint endpoint
Service(Interface B) Service(Interface a)
Web Service Architecture
SOAP
TRANSPORT PROTOCOLS
Web Service Architecture
SERVICE POLICY:
The web service policy framework provides a general purpose model and the corresponding
syntax to describe and communicate the respective policies of a web service.
Policy model and framework defines the following components:
Policy expression: an XML infoset representation of one or more policy assertions
Policy subject: an entity to which a policy can be bounded.
Policy assertion: an individual preference, requirement, capability or other property
Policy attachment: the mechanism for associating policy with one or more subjects is referred
to as a policy attachment.
Web Service Architecture
Web Service Architecture
Fig shows a sample policy expression with two policy statements containing the names QA and
QB respectively.
Policy Expressions and Assertions:
A policy Expression is a mechanism to convey a set of policy assertions. A policy expression is an
XML infoset with a combination of a top level <wsp:policy> container element, the policy
operators(<wsp:all>,<wsp:ExactlyOne>, <wsp:OneorMore>) and some attributes
(<wsu:id,Name, wsp:preference and soon) the attributes Name and ID are used to uniquely
identify the policy expression.
In the above fig there are two policy expressions with a default operation of <wsp:all> this
indicates that with all the policy assertions expressed, there is a present need to be satisfied.
This means that for the first policy expression QA both the assertions must be satisfied.
Web Service Architecture