Introduction To Web Services
Introduction To Web Services
Introduction To Web Services
XML-based
By using XML as the data representation layer for all web
services protocols andtechnologies that are created, these
technologies can be interoperable at their corelevel. As a data
transport, XML eliminates any networking, operating system, orplatform
binding that a protocol has.
Loosely coupled
A consumer of a web service is not tied to that web service
directly; the web serviceinterface can change over time without
compromising the client's ability to interactwith the service. A
tightly coupled system implies that the client and server logic
areclosely tied to one another, implying that if one interface
changes, the other must alsobe updated. Adopting a loosely coupled
architecture tends to make software systemsmore manageable and allows
simpler integration between different systems.
Coarse-grained
Object-oriented technologies such as Java expose their services
through individualmethods. An individual method is too fine an
operation to provide any usefulcapability at a corporate level.
Building a Java program from scratch requires thecreation of several
fine-grained methods that are then composed into a coarse-
grainedservice that is consumed by either a client or another service.
Businesses and theinterfaces that they expose should be coarse-
grained. Web services technologyprovides a natural way of defining
coarse-grained services that access the right amountof business logic.
Over the past two years, three primary technologies have emerged as
worldwide standardsthat make up the core of today's web services
technology. These technologies are:
The relationship between these pieces (SOAP, WSDL, and UDDI) can be
described asfollows: an application acting in the role of a web services
client needs to locate anotherapplication or a piece of business logic
located somewhere on the network. The client queriesa UDDI registry for
the service either by name, category, identifier, or
specificationsupported. Once located, the client obtains information
about the location of a WSDLdocument from the UDDI registry. The WSDL
document contains information about how tocontact the web service and
the format of request messages in XML schema. The clientcreates a SOAP
message in accordance with the XML schema found in the WSDL and sendsa
request to the host (where the service is).
Servic
Discrete
e
Business Logic
UDDI Registry
It's easy to see the use for simple, discrete web services such as
a currency conversion servicethat converts dollars to Euros or a natural
language translation service that converts English toFrench. Today, web
sites such as www.xmethods.com are dedicated to hosting simple
webservices.
Advantages:
SaaS was initially widely deployed for sales force automation and
Customer Relationship Management (CRM). Now it has become commonplace
for many business tasks, including accounting software, computerized
billing, ERP software, invoicing, human resource management, financials,
content management, collaboration, document management, and service desk
management.
Though many Unix applications already work using the SaaS model,
EULA applications did not have this flexibility before SaaS. A licensed
copy of a word processor, for example, had to reside on each machine in
order to create a document on that machine. The equipped program has no
intrinsic value loaded on a computer that is turned off for the night.
The same employee would need another fully paid license to write or edit
a report at home on their own computer, while the work license is
inoperative.
Key characteristics:
Some SaaS applications are free to the user, with revenue being
derived from alternate sources such as advertising, or upgrade fees for
enhanced functionality (often referred to as "freemium"). Examples of
free SaaS applications include large players such as Gmail and Google
Docs, as well as smaller providers like Wave Accounting (free
accounting) and Freshbooks (freemium time tracking and invoicing).
Benefits:
Implementation:
One of the companies that sells that kind of service classifies SaaS
into four "maturity levels," whose key attributes are configurability,
multi-tenant efficiency, and scalability. Each level is distinguished
from the previous one by the addition of one of those three attributes:
Level 1 - Ad-hoc/custom: Each customer has a customized version of
the hosted application that runs as its own instance on the host's
servers. Migrating a traditional non-networked or client–server
application to this level of SaaS typically requires the least
development effort, and reduces operating costs by consolidating
server hardware and administration.
Much like other software, SaaS can also take advantage of Service
Oriented Architecture to let software applications communicate with each
other. Each software service can act as a service provider, exposing its
functionality to other applications via public brokers, and can also act
as a service requester, incorporating data and functionality from other
services. Enterprise Resource Planning (ERP) Software providers leverage
SOA in building their SaaS offerings.
Software as a secure service (SaSS) is a variation of SaaS that
provides security in the link to the service, content storage on the
service, and non-proprietary format data backups and restores of data
stored on the service.
There are two ways to view the web service architecture. The first
is to examine the individual roles of each web service actor; the second
is to examine the emerging web service protocol stack.
Service
Registry
Service Service
2 Provider
Requestor
Service Discovery
UDDI
Service Description
WSDL
Service Invocation
SOAP
Transport
HTTP
UDDI:
Object:
The "O" in SOAP stands for "object" and has to do with its roots
as a way of invoking COM objects across the Internet. As with its
close cousin XML-RPC, SOAP is fully capable of describing a remote
procedure call or method invocation.
Access:
A key feature of SOAP and web services is their accessibility.
The initial developers of SOAP intended for all SOAP conversations to
be carried out via a "binding" to another lower-level protocol, and
that binding would most likely be HTTP or SMTP. These protocols were
chosen because they are almost universally available. Most firewalls
have been trained to allow HTTP sessions and SMTP exchanges, so SOAP
conversations can easily cross corporate boundaries.
It's possible to create a SOAP binding for almost any protocol—
however, for the time being, HTTP is the de facto binding (and most
widely used). Other bindings, such as SOAP over RMI, or SOAP over JMS
(for improved reliability), are emerging.
Protocol:
Put all these factors together and we have a protocol. SOAP is an
XML based protocol used to exchange information throughout a
distributed environment.
TRANSPORT:
While HTTP does get the job done, a number of critics have argued
that HTTP is not ideal for web services. In particular, HTTP was
originally designed for remote document retrieval, and is now being
reworked to support RPCs. RPCs demand greater efficiency and
reliability than document retrieval does.
SOA
Participant Roles:
The SOA is based upon the interactions between three roles: a
provider, a registry (or broker), and a requestor. The interactions
between these roles involve publishing information about a service,
finding which services are available, and binding to those services.
Find
UDDI
Provider
Bind Publish
WSDL, SOAP UDDI
Provider
Provider
SERVICE-ORIENTED ARCHITECTURE
Provider:
In the SOA, a provider is considered the owner of a service. From
a composite computing perspective, it is a software asset that others
regard as a network-accessible service. In most cases, this software
asset is exposed as a web service, which by definition:
Registry (broker)
A registry, or a broker, manages repositories of information on
providers and their software assets. This information includes:
Requestor
In the service-oriented architecture, a requestor is a business
that discovers and invokes software assets provided by one or more
providers. From a composite computing perspective, a requestor is an
application that looks for and initiates an interaction with a
provider. This role could be played by:
Participant Interactions
Having defined the roles that participants in web services can
play, we'll look in more detail at how they interact. There are three
fundamental types of interaction: publishing, service location, and
binding.
2.1.2.1 Publishing
Providers publish information (or metadata) about services to a
registry. These providers are usually standards organizations,
software vendors, and developers. According to IBM's Web Services
Conceptual Architecture document, several different mechanisms are
used to publish service descriptions:
Provider Registry
Here’s my Service
Publishing for dynamic discovery
2.1.2.2 Service location (finding)
Given that registries or brokers publish services, how do you
locate services that you wish to use? Requestors find services using a
registry or broker. Service location is closely associated with
dynamic discovery. In this context, the requestor is an application
that uses a specialized set of APIs to query a public or private
registry for service descriptions. These queries are formatted in a
well-defined, standard XML format and transmitted using an XML
messaging format, such as SOAP or XML-RPC. The criteria used to find a
service include the quality of service (How quickly can the service
respond? How good are its results?), supported protocols (Can my
client talk to your service?), and the service taxonomy (What kind of
service?). It's easy to imagine other criteria that you could use to
locate a service.
Requestor Registry
Look Here
Service location
2.1.2.3 Binding
The binding interaction involves the requestor and provider and,
optionally, the registry. In context, binding is what an application
does when it uses the service description to create a message to be
sent to the service provider. Web service description documents (WSDL
documents) specify the network protocols (i.e., HTTP, MIME, SMTP,
etc.) that a service supports, the APIs by which the service is
accessed, and everything else that a requestor needs to use a service.
Requestor Registry
How do I access?
Here’s how
What is the price of tea in China ?
$ 1.50/ pound
Provider