WSX Unit Iii 2023-24
WSX Unit Iii 2023-24
UNIT III
Business motivations for web services – B2B – B2C – Technical motivations – limitations of
Component Technologies – Architecting web services – Implementation view – web services
technology stack – logical view – composition of web services – deployment view – from
application server to peer to peer – process view – life in the runtime.
1. Explain the business motivations for web services with detail. (Nov 16, Apr 17)
Web Services are loosely coupled contracted components that communicate via XML-
based interfaces. Let‗s take a closer look at this definition:
• Loosely coupled means that Web Services and the programs that invoke them can be
changed independently of each other. Loose coupling also implies that Web Services are
platform independent.
• Contracted means that a Web Service‘s behavior, its input and output parameters, and
how to bind to it are publicly available.
• A component is encapsulated code, which means that the implementation of each
component is hidden from outside the component. Each component‘s functionality is only
known by the interface it exposes.
IV Year/VII Sem 1
IT-T72 Web Services and XML UNIT III
Categories
1. Business-to Business (B2B)
2. Business to Consumer (B2C)
3. Application to Application (A2A)
4. Human to Application (H2A)
IV Year/VII Sem 2
IT-T72 Web Services and XML UNIT III
2. Discuss about Technical motivations for web services with detail. (Nov 16, Apr 17)
Web Services are loosely coupled contracted components that communicate via
XML-based interfaces. Let‗s take a closer look at this definition:
• Loosely coupled means that Web Services and the programs that invoke them can be
changed independently of each other. Loose coupling also implies that Web Services are
platform independent.
• Contracted means that a Web Service‘s behavior, its input and output parameters, and
how to bind to it are publicly available.
• A component is encapsulated code, which means that the implementation of each
component is hidden from outside the component. Each component‘s functionality is only
known by the interface it exposes.
Let us see the Technical motivations and limitations as following,
IV Year/VII Sem 3
IT-T72 Web Services and XML UNIT III
run-time.
Object The ORB is used to The object location and Use the Service Control
Location and locate an object, activation are on Java Manager (SCM) to locate and
Activation and Object Adapter Virtual Machine (JVM) activate an object.
is used for
activation.
Inheritance Support multiple Support multiple Supports multiple interfaces
inheritance at the inheritance at the interface for objects. Every object
interface level. level. Every object implements IUnknown.
Every interface implements
inherits from java.rmi.Remote
CORBA.Object
On-demand A client can bind to A client can do A client can do
Activation a naming or a trader a lookup() on the remote aCoCreateInstance()to
service to activate a server object‘s URL name activate a server object.
server object by to obtain the object
obtaining a server reference.
reference.
Exception Exceptions are Exceptions are thrown at Exceptions are thrown out
Handle thrown at the the interface definition. toHRESULT to be handled.
interface definition. Exceptions are serialized For richer exception handling,
Exception handling and marshaled back across it uses Error Objects,
is taken care of the wire. andISupportErrorInfointerface
by Exception has to be implemented.
Objects.
Garbage Does not attempt to Attempts to perform Attempts to perform
Collection perform general distributed garbage distributed garbage collection
purpose distributed collection of remote server on the wire by pinging. The
garbage collection. objects using the DCOM wire protocol uses a
mechanisms bundled in the Pinging mechanism to
JVM. garbage collect remote server
object references.
Business modeling takes distributed computing with objects to its logical extreme, where
objects are rolled into business components that correspond to coarse-grained business
concepts or processes.
IV Year/VII Sem 4
IT-T72 Web Services and XML UNIT III
IV Year/VII Sem 5
IT-T72 Web Services and XML UNIT III
It is very difficult to integrate a ―one-stop shop‖ vendor‘s product with other vendors‘
products at other companies. As a result, a single vendor approach limits the potential of
e-business.
This problem is especially onerous in the area of legacy integration. Today‘s approach to
integrating legacy systems into component architectures is to create a ―wrapper‖ for the
legacy system so that it will expose a standard interface that all the other components
know how to work with.
Maybe 90 percent of your software is easy to integrate, but the remaining 10 percent
takes up most of your budget
• The SOA organizes Web Services into three basic roles: the service provider, the
service requester, and the service registry.
Fig : Web Service roles and relationships.
IV Year/VII Sem 6
IT-T72 Web Services and XML UNIT III
Service providers publish (and un publish) their services to a service registry. Then,
service requesters can find the desired Web Services by searching for their descriptions at
the service registry.
Once the requester locates the desired service, its client binds with the service at the
service provider and then invokes the service.
Lowest level, Web Services is ―hardwired‖ at design time. This option essentially mimics
a tightly coupled distributed architecture such as a client/server or n-tier architecture. The
developer handles the discovery manually and codes the interface to the desired service
into the service requester.
Next level, the desired Web Service is also identified beforehand, but the service
requester is smart enough to bind to it dynamically at runtime. In this way, the service
requester can vary its request to the service provider, depending on the particular
situation. In addition, the service provider can change its interface from time to time (say,
as part of a functionality upgrade), and service requesters will be able to adjust to the
Change on-the-fly.
Third level indicates JIT integration to the service provider: The service requester can
search a registry dynamically for a provider and then bind to the one it selects. This is the
only level that requires the participation of a service registry.
IV Year/VII Sem 7
IT-T72 Web Services and XML UNIT III
1. Service Implementation
2. Publication
3. Discovery
4. Invocation
5. Just in Time Integration
2.2 Publication
There are three steps to publishing a Web Service:
1. Author the Web Service description document. Written in the Web Services
Description Language (WSDL), this document describes what the Web Service will do,
where it can be found, and how to invoke it.
3. Publish the existence of your document in a Web Services registry using the
Universal Description, Discovery, and Integration (UDDI) specification, which describes
how Web Service registries are organized and how to work with them. A key aspect to
UDDI is the UDDI registry, which acts as a repository for information about published
Web Services. UDDI registries can be global, public registries, or they can be restricted
to an individual enterprise (for a single application or department or for an enterprise
portal) or to a closed group of companies (say, an e-marketplace or a partner catalog).
2.3 Discovery
Once your Web Service appears in a registry, any application can discover your service
and therefore locate the Web Service description document you published. UDDI
registries support pattern queries for automated lookups and return the location of the
WSDL file for the desired service.
IV Year/VII Sem 8
IT-T72 Web Services and XML UNIT III
Once you have obtained the location of this file in the form of a Uniform Resource
Indicator (URI), which is a generalization of the familiar Uniform Resource Locator
(URL), you are able to download the WSDL file itself.
2.4 Invocation
There are two steps to invoking a Web Service:
1. Author a client using the Simple Object Access Protocol (SOAP). The WSDL
file you downloaded contains the information you need to create a client using SOAP.
Because you are authoring clients on-the-fly based on information you found in the Web
Service description document, you are able to invoke the Web Service dynamically at
runtime.
2. Make a SOAP call. Your client then creates a SOAP message describing what
it wants the remote Web Service to do and then sends it to the URI specified in the
WSDL document. Typically, the Web Service returns a SOAP message in the format
detailed in the Web Service description document.
• Object-oriented (OO) systems address the problem of semantics when the systems are
small, but ambiguity creeps in when OO systems are scaled up. In a small OO implementation,
the naming conventions of the methods as well as their signatures (the parameters the methods
take in different situations) often connote to the developer the meaning of the methods and
arguments.
• While the work on semantic issues is ongoing, some of the developments have been
incorporated into the Web Services arena in the form of taxonomies.
IV Year/VII Sem 9
IT-T72 Web Services and XML UNIT III
custom built to serve special purposes. The simplest taxonomy used in UDDI registries is
geographical: country followed by political division—for example, United States,
4.1 Security
There are four basic requirements that a Web Services security
Confidentiality - The contents of the messages must not be available to
unauthorized parties.
Authentication - The sender of a message must be authorized to send a message,
and the recipient of the message must be able to confirm the identity of the sender of the
message.
Data integrity - The recipient of a message must be able to guarantee that the
message hasn‘t been tampered with in transit.
Nonrepudiation - The recipient of a message must be able to guarantee the
circumstances surrounding the sending of the message.
There are three access control models that Web Service registries
•A promiscuous registry doesn‘t authenticate the publishers or the requesters.
Such registries don‘t make any claims about the correctness of the data in the registry or
the integrity of the participants. Although a promiscuous registry is the simplest form of
registry to set up, its usefulness is limited by its lack of access control.
The sending of messages to and from Web Services will fall into three basic modes:
• Best effort.
• The service requester sends the request message, and neither the requester nor
the message infrastructure attempts a retransmission in the case of a failure to deliver the
message.
IV Year/VII Sem 10
IT-T72 Web Services and XML UNIT III
• At least once.
• The service requester continues to attempt to send the request until it receives
acknowledgment from the service provider that the message was received. As a result,
the service provider might receive more than one copy of the message.
• If the request is a simple query, this duplication isn‘t a major problem (although
it will contribute to network overhead). However, in other cases, each message may need
to carry a unique ID so that the service provider can recognize a duplicate message.
Along with its acknowledgment, the service provider either sends the requested response
or a ―cannot process message‖ exception.
• Exactly once
• The service requester makes its request, and the service provider guarantees in
its reply that the request has been executed (or it sends an error message, if necessary).
The ―exactly once‖ mode of messaging requires an endpoint manager at either end of the
message to relay messages and guarantee responses (which may simply be a timeout
exception should the service provider fail to respond).
• Endpoint managers also frequently support the queuing of messages or more
complex behaviors such as forwarding messages to other service providers. The exactly
once mode is only applicable when both endpoints participate in the appropriate
messaging infrastructure—for example, within an enterprise or between two companies
who have configured their joint messaging infrastructure beforehand.
4. Write in detail the Architecting Web Services (4+1 View Model) with a neat diagram.
(Nov 16, Apr 17)
IV Year/VII Sem 11
IT-T72 Web Services and XML UNIT III
• Each of the four main views takes the perspective of key stakeholders in the
development process. The fifth view, the Use-Case View, overlaps the other views and
plays a special role with regard to the architecture.
IV Year/VII Sem 12
IT-T72 Web Services and XML UNIT III
On top of the SOAP layer comes three layers that together form the service description.
WSDL is the de facto standard for service descriptions, with the addition of the still
tentative WSEL for endpoint descriptions.
The service interface definition contains the binding, portType, message, and type
elements, which form the portion of the service description that is reusable from one
implementation to another.
The service implementation definition, however, contains those elements that are specific
to each implementation: the service and port elements.
Next comes the endpoint description, which introduces semantics to the service
descriptions that apply to a particular implementation. Endpoint descriptions can contain
security, QoS, and management attributes that help to define the policies for each of these
vertical columns.
Only when the architect has dealt with the issues of service publication and discovery can
he move on to the more complex issues regarding the interaction of multiple Web
Services.
WSFL and WSCL are still in development, and it‘s not clear how these layers will be
handled in the future.
Securing the base stack is relatively straightforward, because it is internal to the
enterprise; securing Web Services involved in publication and discovery across the
Internet is another issue entirely.
QoS, as well, means different things at each layer. Network QoS involves network
uptime, packet delivery, and valid HTTP messages. Reliable messaging, however,
depends heavily on the capabilities of the endpoint manager, which uses WSEL or
another endpoint description language.
Transactions, in fact, must be handled on multiple levels of the service stack, because of
the complexity of handling rollbacks in a multi-enterprise Web Services environment. To
roll back a particular conversation, each operation within that conversation may need to
be reversed.
IV Year/VII Sem 13
IT-T72 Web Services and XML UNIT III
This workflow consists of two separate workflows: a public workflow as well as one
private to the seller. From the buyer‘s point of view, the seller is exposing a single public
Web Service that is composed of separate Web Services in succession.
The interfaces to the two public services are both written in WSDL. The buyer has
obtained the seller‘s service description beforehand—either by looking it up in a registry
or through a prearranged relationship between the buyer and the seller.
The architect must work with several different elements in a complex workflow
The sequencing rules that describe how the Web Services interact over time.
The information flows between each of the services (including the necessary data
mapping).
The service providers responsible for executing each step. Is the inventory-management
service responsible for executing any of its internal steps, or are they taken care of by the
component services?
The associations between activities in the workflow.
IV Year/VII Sem 14
IT-T72 Web Services and XML UNIT III
Synchronous system
There is a single, closed loop starting and ending at the buyer that every request follows
to completion.
In reality, however, some of the processes will be synchronous whereas others will be
asynchronous.
The inventory-management service will likely communicate with the buyer through the
public ecommerce service to determine whether or not the product is in stock, and then
the pick, pack, and ship process will take place asynchronously. As a result, the architect
must also consider how the buyer (as well as the seller) will be able to monitor and
control the asynchronous inventory service.
The user context contains information about the user as well as information about the
user’s session,
Demographic information, credit card information, and so on
The user‘s physical location
The user‘s locale (the user‘s language, currency, number format, and so on)
The user‘s security level and permissions
Personalization information that pertains to the Web site the user is visiting, including
merchandise preferences, calendar information, buddy lists, and so on
IV Year/VII Sem 15
IT-T72 Web Services and XML UNIT III
This model follows a traditional n-tier architecture, except that the Web server is also
responsible for sending and receiving the XML messages that form the Web Services
interface.
It is also possible to build Web Services on a peer-to-peer (P2P) developer model. P2P,
popularized by the Napster music service, is a distributed architecture that does not rely
on central servers but rather distributes responsibility to systems (called peers) in the
network.
IV Year/VII Sem 16
IT-T72 Web Services and XML UNIT III
IV Year/VII Sem 17