SlideShare une entreprise Scribd logo
1  sur  86
Télécharger pour lire hors ligne
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
1
Unit 1 : Web services basics
What Are Web Services?
A Web service is a self-describing, self-contained software module available via a network, such as the
Internet, which completes tasks, solves problems, or conducts transactions on behalf of a user or
application.
Web services constitute a distributed computer infrastructure made up of many different interacting
application modules trying to communicate over private or public networks (including the Internet and
Web) to virtually form a single logical system.
A Web service can be:
1. a self-contained business task, such as a funds withdrawal or funds deposit service;
2. a full-fledged business process, such as the automated purchasing of office supplies;
3. an application, such as a life insurance application or demand forecasts and stock
replenishment;
4. a service-enabled resource, such as access to a particular back-end database containing patient
medical records.
Web services address the problems of rigid implementations of predefined relationships and isolated
services scattered across the Internet.
The long-term goal of Web services technology is to enable distributed applications that can be
dynamically assembled according to changing business needs, and customized based on device (such as
personal computers, workstations, laptops, WAP-enabled cellular phones, personal digital assistants),
network (such as cable, UMTS, XDSL, Bluetooth, etc.) and user access while enabling wide utilization of
any given piece of business logic wherever it is needed.
Once a Web service is deployed, other applications and Web services can discover and invoke it.
Web services are loosely coupled software modules: Web services protocols, interfaces, and registry
services enable applications to work cooperatively together using the principle of loose coupling.
Web services semantically encapsulate discrete functionality: A Web service is a self-contained
software module that performs a single task. The module describes its own interface characteristics, i.e.,
the operations available, the parameters, data typing, and the access protocols, in such a way that other
software modules can determine what it does, how to invoke its functionality, and what result to expect
in return.
Web services can be accessed programmatically: A Web service provides programmable access – this
allows embedding Web services into remotely located applications. This enables information to be
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
2
queried and updated, thus improving efficiency, responsiveness, and accuracy – ultimately leading to
high added value to the Web services clients.
Web services can be dynamically found and included in applications: Unlike existing interface
mechanisms, Web services can be assembled to serve a particular function, solve a specific problem, or
deliver a particular solution to a customer.
Web services are described in terms of a standard description language: the Web Services Description
Language or WSDL describes both functional as well as nonfunctional service characteristics.
Web services are distributed over the Internet: Web services make use of existing, ubiquitous transport
Internet protocols like HTTP.
Types of Web services
Topologically, Web services can come in two flavors
1. Informational, or type I, Web services, which support only simple request/response operations
and always wait for a request; they process it and respond.
2. Complex, or type II Web services implement some form of coordination between inbound and
outbound operations.
Simple or informational services
Informational services are services of relatively simple nature. They either provide access to content
interacting with an end user by means of simple request/response sequences, or alternatively may
expose back-end business applications to other applications. Web services that typically expose the
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
3
business functionality of the applications and components that underlie them are known as
programmatic services.
Informational services can be subdivided into three subcategories
1. Pure content services, which give programmatic access to content such as weather report
information, simple financial information, stock quote information, design information, news
items, and so on.
2. Simple trading services, which are more complicated forms of informational services that can
provide a seamless aggregation of information across disparate systems and information
sources, including back-end systems, giving programmatic access to a business information
system so that the requestor can make informed decisions.
eg: logistic services
3. Information syndication services, which are value-added information Web services that purport
to “plug into” commerce sites of various types, such as e-marketplaces, or sell-sites.
Typical examples of syndicated services might include reservation services on a travel
site or rate quote services on an insurance site.
Complex services or business processes
• Enterprises can use a singular (discrete) service to accomplish a specific business task, such as
billing or inventory control.
• When enterprises need to compose several services together to create a business process such
as customized ordering, customer support, procurement, and logistical support, they need to
use complex Web services.
• Complex (or composite) services typically involve the assembly and invocation of many pre-
existing services possibly found in diverse enterprises to complete a multi-step business
interaction.
Distributed computing infrastructure
A distributed system is characterized as a collection of (probably heterogeneous) networked computers,
which communicate and coordinate their actions by passing messages. Distribution is transparent to the
user so that the system appears as a single integrated facility.
A distributed system has numerous operational components (computational elements, such as servers
and other processors, or applications) which are distributed over various interconnected computer
systems.
Distributed systems usually use some kind of client–server organization. A computer system that hosts
some component of a distributed system is referred to as a host. Distributed components are typically
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
4
heterogeneous in that they are written in different programming languages and may operate under
different operating systems and diverse hardware platforms.
Internet protocols
To enable data to be transmitted across the Internet typical distributed platforms, such as J2EE, rely on
the support of Internet protocols.
The most prominent of the Internet protocols is the Transport Control Protocol over Internet Protocol
(or TCP/IP). The Internet Protocol (IP), the basic protocol of the Internet, enables the unreliable delivery
of individual packets from one host to another.
The Transport Control Protocol (TCP) adds the notions of connection and reliability.
These two protocols provide for the reliable delivery of streams of data from one host to another across
communication networks, and the Internet in particular.
Open Systems Interconnection
A reference model is a conceptual blueprint of how communications should take place. It addresses all
the processes required for effective communication and divides these processes into logical groupings
called layers. When a communication system is designed in this manner, it is known as layered
architecture.
The TCP/IP network protocol
The TCP/IP stack is shown in Figure in association with the various layers of the ISO/OSI model. This
figure shows that each level of the TCP/IP stack builds on the services provided by the layer below it.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
5
Middleware
Middleware is connectivity software that is designed to help manage the complexity and heterogeneity
inherent in distributed systems by building a bridge between different systems thereby enabling
communication and transfer of data.
Middleware could be defined as a layer of enabling software services that allow application elements to
interoperate across network links, despite differences in underlying communications protocols, system
architectures, operating systems, databases, and other application services.
The role of middleware is to ease the task of designing, programming, and managing distributed
applications by providing a simple, consistent, and integrated distributed programming environment.
Essentially, middleware is a distributed software layer, or “platform,” that lives above the operating
system and abstracts over the complexity and heterogeneity of the underlying distributed environment
with its multitude of network technologies, machine architectures, operating systems, and programming
languages.
The figure shows that the middleware abstraction comprises two layers. The bottom layer is concerned
with the characteristics of protocols for communicating between processes in a distributed system and
how the data objects, e.g., a sales order, and data structures used in application programs can be
translated into a suitable form for sending messages over a communications network, taking into
account that different computers may rely on heterogeneous representations for simple data items. The
layer above is concerned with interprocess communication mechanisms, while the layer above that is
concerned with non-message- and message-based forms of middleware.
Non-message-based forms of middleware provide synchronous communication mechanisms designed to
support client–server communication.
Message-based forms of middleware provide asynchronous messaging and event notification
mechanisms to exchange messages or react to events over electronic networks.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
6
client–server model
The client–server architecture is one of the common solutions to the conundrum of how to handle the
need for both centralized data control and widespread data accessibility.
Client–server involves client processes (service consumers) requesting service from server processes
(service providers).
Servers may in turn be clients of other servers. For instance, a Web server is often a client of a local file
server (or database server) that manages the files (storage structures) in which Web pages are stored
.
Characteristics of interprocess communication
Messaging
Distributed systems and applications communicate by exchanging messages. Messaging is a technology
that enables high-speed, asynchronous, program-to-program communication with reliable delivery.
Programs communicate by sending packets of data called messages to each other. The concept of a
message is a well-defined, data-driven text format – containing the business message and a network
routing header – that can be sent between two or more applications.
A message typically comprises three basic elements: a header, its properties, and a message payload or
body.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
7
The message header is used by both the messaging system and the application developer to provide
information about characteristics such as the destination of a message, the message type, the message
expiration time, and so forth.
The properties of a message contain a set of application-defined name/value pairs.
The message body carries the actual “payload” of the message. The format of the message payload can
vary across messaging implementations. Most common formats are plain text, a raw stream of bytes for
holding any type of binary data, or a special XML message type that allows the message payload to be
accessed using any number of common XML parsing technologies.
Message passing between a pair of processes is supported by two message communication operations:
send and receive, defined in terms of destinations and messages.
Marshalling is the process of taking an object or any other form of structured data items and breaking it
up so that it can be transmitted as a stream of bytes over a communications network in such a way that
the original object or data structure can be reconstructed easily on the receiving end.
Unmarshalling is the process of converting the assembled stream of bytes on arrival to produce an
equivalent object or form of structured data at the destination point. Therefore, marshalling comprises
the transformation of structured data items and primitive values into an agreed standard form of
representation for transmission across the network.
Java and XML use the terms serialization and deserialization to denote the process of marshalling and
unsmarshalling
Message destinations and sockets
messages are sent to ports.
Servers usually publicize their port numbers for use by clients and processes use multiple ports from
which to receive messages.
During interprocess communication messages are sent to (Internet address, local port) pairs.
Many applications involve two processes in different hosts communicating with each other over a
network. These two processes communicate with each other by exchanging (sending and receiving)
messages. A process sends messages into, and receives messages from, the network through its socket.
A process’s socket could be thought of as the entry point to the process. Interprocess communication
consists of transmitting a message between a client and a socket in another process Once the message
arrives at its destination, it passes through the receiving process’s socket and the receiving process then
acts on the message.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
8
Synchronous and asynchronous forms of message communication
These modes are: synchronous or time dependent and asynchronous or time independent.
The defining characteristic of a synchronous form of execution is that message communication is
synchronized between two communicating application systems, which must both be up and running,
and that execution flow at the client’s side is interrupted to execute the call. Both the sending and the
receiving application must be ready to communicate with each other at all times.
When using asynchronous messaging, the caller employs a send and forget approach that allows it to
continue to execute after it sends the message. With asynchronous communication, an application
sends (requestor or sender) a request to another while it continues its own processing activities. The
sending application does not have to wait for the receiving application to complete and for its reply to
come back.
Synchronous forms of middleware
Programming models for synchronous forms of middleware are composed of cooperating programs
running in several interacting distributed processes. Such programs need to be able to invoke operations
synchronously in other processes, which frequently run in different computing systems.
The most familiar approaches to non-message-based forms of middleware are typified by the remote
procedure call (RPC) and the remote method invocation (RMI).
Remote procedure calls
RPC is a basic mechanism for interprogram communication. In effect, RPC is the middleware mechanism
used to invoke a procedure that is located on a remote system, and the results are returned.
By design, the RPC programming style mimics the serial thread of execution that a “normal” non-
distributed application would use, where each statement is executed in sequence.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
9
The RPC mechanism is the simplest way to implement client–server applications because it keeps the
details of network communications out of the application code.
In RPC-style programming, an object and its methods are “remoted” such that the invocation of the
method can happen across a network separation.
In client application code, an RPC looks like a local procedure call, because it is actually a call to a local
proxy known as a client stub (a surrogate code that supports RPCs).
The client stub communicates with a server stub using the RPC runtime library, which is set of
procedures that support all RPC applications. A server stub is like a skeleton method in that it
unmarshals the arguments in the request message, calls the corresponding service procedure, and
marshals the return results for the reply message.
The server stub communicates its output to the client stub, again by using the RPC runtime library.
Finally, the client stub returns to the client application code.
Remote method invocation
The Java RMI provides a simple and direct model for distributed computation with Java objects on the
basis of the RPC mechanism.
If the particular method happens to be on a remote machine, Java provides the capability to make the
RMI appear to the programmer to be the same as if the method is on the local machine.
RMI applications comprise two separate programs: a server and a client. RMI provides the mechanism
by which the server and the client communicate and pass information back and forth.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
10
There are two different kinds of classes that can be used in RMI: remote and serializable classes.
A remote object is an instance of a remote class. When a remote object is used in the same address
space, it can be treated just like an ordinary object. But if it is used externally to the address space, the
object must be referenced by an object handle.
Asynchronous forms of middleware
Asynchronous communication promotes a loosely coupled environment in which an application does
not need to know the intimate details of how to reach and interface with other applications.
Store and forward messaging
With the store and forward queuing mechanism, messages are placed on a virtual channel called a
message queue by a sending application and are retrieved by the receiving application as needed.
Messages are exchanged through a queue, which is the destination to which senders send messages and
a source from which receivers receive messages.
The queue is a container that can keep hold of a message until the recipient collects it. The message
queue is independent of both the sender and receiver applications and acts as a buffer between the
communicating applications.
Asynchronous communication with the store and forward queuing mechanism allows work to be
performed whenever applications are ready.
The message delivery semantics include several delivery options which range from exactly-once delivery
to at-least-once delivery and to at-most-once delivery.
The store and forward queuing mechanism is typical of a many-to-one messaging paradigm where
multiple applications can send messages to a single application. The same application can be sender,
receiver, or both sender and receiver. Message queuing provides a highly reliable, although not always
timely, means of ensuring that application operations are completed.
In many applications there is an additional requirement that the concept of store and forward is capable
of being repeated across multiple message servers that are chained together.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
11
In this configuration, each message server uses the principle of store and forward and message
acknowledgements to get the message to the next server in the chain of interconnected message
servers.
Publish/subscribe messaging
This mode of messaging is a slightly more scalable form of messaging when compared to the store and
forward mechanism. The publish/subscribe messaging works as follows. Suppose that a publisher
application publishes messages on a specific topic, such as sending out new product prices or new
product descriptions to retailers.
Multiple subscribing applications can subscribe to this topic and receive the messages published by the
publishing application.
This figure describes how the publish/subscribe semantics work:
1. Publishers publish messages to specific topics.
2. A message server keeps track of all the messages, and all its currently active and durable
subscribers (subscribers who specifically expressed a durable interest in the topic). The message
server provides a secure environment for the messaging system by handling authorization and
authentication.
3. As soon as messages are published on a specific topic, they are distributed to all of its
subscribers. Durable subscribers, who were not connected at the time of message
Event-driven processing mechanisms
The familiar one-to-one request/reply interaction pattern that is commonly used in client–server
systems is inadequate for systems that must react to events representing changes in the environment,
information of interest, or process status, which are particularly well suited for distributed environments
without central control.
The asynchrony, heterogeneity, and inherent loose coupling that characterize modern applications in a
wide area network promote event interaction as a natural design abstraction for a growing class of
software systems. Such systems are based on a technical infrastructure known as an event notification
service
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
12
An event notification service complements other general-purpose middleware services, such as point-
to-point and multicast communication mechanisms, by offering a manyto- many communication and
integration facility. Clients in an event notification scheme are of two kinds: objects of interest, which are
the producers of notifications, and interested parties, which are the consumers of notifications.
Point-to-point queuing
The point-to-point messaging model allows clients to send and receive messages both synchronously
and asynchronously via queues. The point-to-point messaging model provides reliable communication
for multi-staged applications. This model has traditionally been a pull-based or pollingbased model,
where messages are requested from a queue instead of being pushed to the client automatically as is
the case with publish/subscribe model.
Request/reply messaging
On many occasions applications require that request/reply messaging operations be performed. Here,
we can distinguish between two types of request/reply messaging operations: synchronous
request/reply messaging and asynchronous request/reply messaging operations. Synchronous
request/reply messaging is often necessary when trying to integrate with a Web service client that
blocks and waits for a synchronous response to return to it
In the asynchronous version of request/reply messaging, the requestor (sender) expects the reply to
arrive at a later time and continue its work unaffected.
a simple request /reply asynchronous messaging configuration. Observe that in this figure message
delivery channels are not bidirectional. To perform a request/reply operation the sender must use two
channels: one for the request and one for the reply.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
13
Message-oriented middleware
Message-oriented middleware (MOM) is an infrastructure that involves the passing of data between
applications using a common communication channel that carries self-contained messages.
In an MOM-based communication environment, messages are usually sent and received
asynchronously.
Using message-based communications, applications are abstractly decoupled as senders and receivers
are not aware of each other.
Instead they send and receive messages from the messaging system and it is the responsibility of the
messaging
system, namely the MOM, to forward the messages to their intended destination.
MOM is interposed between the client and the server part of client–server architecture and handles
asynchronous calls between clients and servers,
To support this asynchronous model, MOM products typically use message queues to store calls
temporarily and allow clients and servers to run at different times. Messages in the queue can consist of
formatted data, requests for action, or both.
The messaging system is responsible for managing the connection points between messaging clients,
and for managing multiple channels of communication between the connection points. The messaging
system is usually implemented by a software module known as the message (or integration) broker.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
14
Integration brokers
Integration brokers perform necessary content and format transformation to translate incoming
messages into a scheme that the destination system(s) can understand and utilize. Integration brokers
are usually built on top of some MOM implementations and so the general principles of MOM also apply
to them.
Initially integration brokers were called message brokers but this name often led to a
mischaracterization and confusion between message brokers and message-oriented middleware. More
recently, message brokers have been renamed integration brokers, which is a more descriptive name for
the features they provide.
An integration broker is an application-to-application middleware service that is capable of one-to-
many, many-to-one, and many-to-many message distribution. An integration broker is a software hub
that records and manages the contracts between publishers and subscribers of messages.
The Java Message Service (JMS)
JMS is a vendor-agnostic API for enterprise messaging that can be used with many different MOM
vendors. JMS acts as a wrapper around different messaging products, allowing developers to focus on
actual application development and integration, rather on the particulars of each other’s APIs.
Application developers use the same API to access many different systems. JMS is not a messaging
system itself. It is an abstraction of the interfaces and classes needed by messaging clients when
communicating with different messaging systems.
JMS not only provides a Java API for connectivity to MOM systems, but also supports messaging as a
first-class Java distributed computing paradigm on an equal footing with RPC
A common application for JMS involves interfacing Enterprise Java Beans (EJBs) with legacy applications
and sending legacy-related data between the two.
The JMS messaging point-to-point model allows JMS clients to send and receive messages both
asynchronously and synchronously via queues.
JMS supports two types of message delivery: reliable message delivery and guaranteed message
delivery.
overview of XML
XML is an extensible markup language used for the description and delivery of marked-up electronic text
over the Web.
Two important characteristics of XML distinguish it from other markup languages: its document type
concept and its portability.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
15
An important aspect of XML is its notion of a document type. XML documents are regarded as having
types. XML’s constituent parts and their structure formally define the type of a document.
An XML document is composed of named containers and their contained data values. Typically, these
containers are represented as declarations, elements, and attributes. A declaration declares the version
of XML used to define the document. The technical term used in XML for a textual unit, viewed as a
structural component, is element.
An XML document is also known as an instance or XML document instance. This signifies the fact that an
XML document instance represents one possible set of data for a particular markup language.
The example in Listing typifies an XML document instance. This example shows billing information
associated with a purchase order issued by plastics manufacturer.
<?xml version="1.0" encoding="UTF-8"?>
<BillingInformation>
<Name> Right Plastic Products </Name>
<BillingDate> 2002-09-15 </BillingDate>
<Address>
<Street> 158 Edward st. </Street>
<City> Brisbane </City>
<State> QLD </State>
<PostalCode> 4000 </PostalCode>
</Address>
</BillingInformation>
XML declaration
The XML processing software uses the declaration to determine how to deal with the subsequent XML content. A
typical XML declaration begins with a prologue that typically contains a declaration of conformity to version 1.0 of
the XML standard and to the UTF-8 encoding standard: <?xml version="1.0" encoding="UTF-8"?>.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
16
Elements
The topmost element of the XML document is a single element known as the root element.
The content of an element can be character data, other nested elements, or a combination of both.
Elements contained in other elements are referred to as nested elements.
The containing element is the parent element and the nested element is called the child element.
Attributes
Another way of putting data into an XML document is by adding attributes to start tags. Attributes are
used to better specify the content of an element on which they appear by adding information about a
defined element.
An attribute specification is a name–value pair that is associated with an element.
Unlike elements, attributes cannot be nested. They must also always be declared in the start tag of an
element.
URIs and XML namespaces
A Web architecture starts with a uniform syntax for resource identifiers, so that one can refer to
resources, access them, describe them, and share them.
The Uniform Resource Identifier (URI) is the basis for identifying resources in WWW. A URI consists of a
string of characters that uniquely identifies a resource.
The W3C uses the newer and broader term URI to describe network resources rather than the familiar
but narrower term Uniform Resource Locator (URL).
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
17
XML allows designers to choose the names of their own tags and as a consequence it is possible that
name clashes (i.e., situations where the same tag name is used in different contexts) occur when two or
more document designers choose the same tag names for their elements.
XML namespaces provide a way to distinguish between elements that use the same local name but are
in fact different, thus avoiding name clashes.
A namespace declaration is indicated by a URI denoting the namespace name. The URI may be mapped
to a prefix that may then be used in front of tag and attribute names, separated by a colon.
In order to reference a namespace, an application developer needs to first declare one by creating a
namespace declaration using the form
An XML example using namespaces
xmlns:<Namespace Prefix> = <someURI>
<?xml version="1.0" encoding="UTF-8"?>
<BillingInformation customer-type="manufacturer"
xmlns="http://www.plastics_supply.com/BillInfo">
XML Schema
An XML Schema describes the structure of an XML document.
The XML Schema language is also referred to as XML Schema Definition (XSD).
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="note">
<xs:complexType>
<xs:sequence>
<xs:element name="to" type="xs:string"/>
<xs:element name="from" type="xs:string"/>
<xs:element name="heading" type="xs:string"/>
<xs:element name="body" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Using XSLT to transform documents
To perform document transformation, a document developer usually needs to supply a style sheet,
which is written in XSLT. The style sheet specifies how the XML data will be displayed.
XSLT uses the formatting instructions in the style sheet to perform the transformation. The converted
document can be another XML document or a document in another format, such as HTML, that can be
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
18
displayed on a browser. Formatting languages, such as XSLT, can access only the elements of a
document that are defined by the document structure, e.g., XML schema.
SOAP: Simple Object Access Protocol
Web services rely on SOAP, an XML-based communication protocol for exchanging messages between
computers regardless of their operating systems, programming environment, or object model
framework.
SOAP codifies the use of XML as an encoding scheme for request and response parameters using HTTP
as a means for transport.
In particular, a SOAP method is simply an HTTP request and response that complies with the SOAP
encoding rules. A SOAP endpoint is simply an HTTP-based URL that identifies a target for method
invocation.
SOAP provides a wire protocol in that it specifies how service-related messages are structured when
exchanged across the Internet.
SOAP as a wire representation
SOAP makes use of openly available technologies that, when combined, specify a wire protocol. SOAP
commonly uses HTTP to transport XML-encoded serialized method argument data from system to
system. This serialized argument data is used on the remote end to execute a client’s method call on
that system, rather than on a local system.
Wire protocols, such as SOAP, are designed to meet specific design criteria, including [Scribner 2002]
compactness, protocol efficiency, coupling, scalability, and interoperability:
• Compactness refers to how terse a network package becomes while conveying the same
information. Small degree of compactness is usually best.
• Protocol efficiency is directly related to compactness. Efficiency is rated by examining the
overhead required to send the payload. The more overhead required, the less efficient the
protocol is.
• Coupling is the rate at which the client application needs to adapt to changes. Loosely coupled
protocols are quite flexible and can easily adapt to changes, while tightly coupled protocols
require significant modifications to both the server and existing clients.
• Scalability addresses the ability of a protocol to work with a large number of potential
recipients. Some protocols are limited to a few hundreds of clients, while others can easily
handle millions.
• Interoperability refers to the ability of the protocol to work with a variety of computing
platforms. For instance, general-purpose protocols enable clients to send information to a
variety of systems.
SOAP as a messaging protocol
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
19
The Web services communication and messaging network
SOAP has a clear purpose: exchanging data over networks. Specifically, it concerns itself with
encapsulating and encoding XML data and defining the rules for transmitting and receiving that data
Structure of a SOAP message
A SOAP message is an ordinary XML document containing the following elements −
• Envelope − Defines the start and the end of the message. It is a mandatory element.
• Header − Contains any optional attributes of the message used in processing the message,
either at an intermediary point or at the ultimate end-point. It is an optional element.
• Body − Contains the XML data comprising the message being sent. It is a mandatory element.
• Fault − An optional Fault element that provides information about errors that occur while
processing the message.
<?xml version = "1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV = "http://www.w3.org/2001/12/soap-envelope"
SOAP-ENV:encodingStyle = "http://www.w3.org/2001/12/soap-encoding">
<SOAP-ENV:Header>
...
...
</SOAP-ENV:Header>
<SOAP-ENV:Body>
...
...
<SOAP-ENV:Fault>
...
...
</SOAP-ENV:Fault>
...
</SOAP-ENV:Body>
</SOAP_ENV:Envelope>
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
20
The SOAP communication model
The Web services communication model describes how to invoke Web services and relies on SOAP. The
SOAP communication model is defined by its communication style and its encoding style. SOAP supports
two possible communication styles:
1. RPC and
2. document (or message).
RPC-style Web service
Document-style Web services
Error handling in SOAP
SOAP provides a model for handling situations when faults arise in the processing of a message. SOAP
distinguishes between the conditions that result in a fault and the ability to signal that fault to the
originator of the faulty message or another node. The SOAP <Body> element has another distinguishing
role in that it is the place where fault information is placed.
The SOAP fault model requires that all SOAP-specific and application-specific faults
be reported using a special-purpose element called env:Fault.
<env:Body>
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
21
<env:Fault>
<env:Code>
<env:Value>env:Sender</env:Value>
<env:Subcode>
<env:Value> m:InvalidPurchaseOrder </env:Value>
</env:Subcode>
</env:Code>
<env:Reason>
<env:Text xml:lang="en-UK"> Specified product
did not exist </env:Text>
</env:Reason>
<env:Detail>
<err:myFaultDetails
xmlns:err="http://www.plastics_supply.com/
faults">
<err:message> Product number contains invalid
characters
</err:message>
<err:errorcode> 129 </err:errorcode>
</err:myFaultDetails>
</env:Detail>
</env:Fault>
</env:Body>
SOAP over HTTP
Quite logically, SOAP requests are sent via an HTTP request and SOAP responses are returned within the
content of the HTTP response. While SOAP requests can be sent via an HTTP GET, the specification
includes details on HTTP POST only.
Additionally, both HTTP requests and responses are required to set their content type to text/xml.
The SOAP specification mandates that the client must provide a SOAPAction header, but the actual value
of the SOAPAction header is dependent on the SOAP server implementation.
For example, to access the AltaVista BabelFish Translation service, hosted by XMethods, you must
specify the following as a SOAPAction header.
urn:xmethodsBabelFish#BabelFish
Even if the server does not require a full SOAPAction header, the client must specify an empty string ("")
or a null value. For example −
SOAPAction: ""
SOAPAction:
Here is a sample request sent via HTTP to the XMethods Babelfish Translation service −
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
22
POST /perl/soaplite.cgi HTTP/1.0
Host: services.xmethods.com
Content-Type: text/xml; charset = utf-8
Content-Length: 538
SOAPAction: "urn:xmethodsBabelFish#BabelFish"
<?xml version = '1.0' encoding = 'UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd = "http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:BabelFish
xmlns:ns1 = "urn:xmethodsBabelFish"
SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
<translationmode xsi:type = "xsd:string">en_fr</translationmode>
<sourcedata xsi:type = "xsd:string">Hello, world!</sourcedata>
</ns1:BabelFish>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Note the content type and the SOAPAction header. Also note that the BabelFish method requires two
String parameters. The translation mode en_fr translates from English to French.
Here is the response from XMethods
HTTP/1.1 200 OK
Date: Sat, 09 Jun 2001 15:01:55 GMT
Server: Apache/1.3.14 (Unix) tomcat/1.0 PHP/4.0.1pl2
SOAPServer: SOAP::Lite/Perl/0.50
Cache-Control: s-maxage = 60, proxy-revalidate
Content-Length: 539
Content-Type: text/xml
<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENC = "http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd = "http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<namesp1:BabelFishResponse xmlns:namesp1 = "urn:xmethodsBabelFish">
<return xsi:type = "xsd:string">Bonjour, monde!</return>
</namesp1:BabelFishResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
SOAP responses delivered via HTTP are required to follow the same HTTP status codes. For example, a
status code of 200 OK indicates a successful response. A status code of 500 Internal Server Error
indicates that there is a server error and that the SOAP response includes a Fault element.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
23
Advantages and disadvantages of SOAP
Simplicity: SOAP is simple as it based on XML, which is highly structured and easy to parse.
Portability: SOAP is portable without any dependencies on the underlying platform like byte-ordering
issues or machine-word widths. Today, XML parsers exist for virtually any platform from mainframes to
write-watch-size devices.
Firewall-friendly: Posting data over HTTP means not only that the delivery mechanism is widely
available but also that SOAP is able to get past firewalls that pose problems for other methods.
Use of open standards: SOAP uses the open standard of XML to format the data, which makes it easily
extendable and well supported.
Interoperability: SOAP is built on open, rather than vendor-specific, technologies and facilitates true
distributed interoperability and loosely coupled applications. Because SOAP is a wire protocol based on
XML and HTTP, it is possibly the most widely interoperable protocol to date and can be used to describe
message exchanges between autonomous technical environments and highly diverse enterprise
applications.
Universal acceptance: SOAP is the most widely accepted standard in the message communication
domain.
Resilience to changes: Changes to the SOAP infrastructure will likely not affect applications using the
protocol, unless significant serialization changes are made to the SOAP specification.
Building Web Services with JAX-WS
Java API for XML Web Services (JAX-WS) is a technology for building web services and clients that
communicate using XML. JAX-WS allows developers to write message-oriented as well as Remote
Procedure Call-oriented (RPC-oriented) web services.
In JAX-WS, a web service operation invocation is represented by an XML-based protocol, such as SOAP.
The SOAP specification defines the envelope structure, encoding rules, and conventions for representing
web service invocations and responses. These calls and responses are transmitted as SOAP messages
(XML files) over HTTP.
Although SOAP messages are complex, the JAX-WS API hides this complexity from the application
developer. On the server side, the developer specifies the web service operations by defining methods
in an interface written in the Java programming language. The developer also codes one or more classes
that implement those methods. Client programs are also easy to code. A client creates a proxy (a local
object representing the service) and then simply invokes methods on the proxy. With JAX-WS, the
developer does not generate or parse SOAP messages. It is the JAX-WS runtime system that converts the
API calls and responses to and from SOAP messages.
With JAX-WS, clients and web services have a big advantage: the platform independence of the Java
programming language
Communication between a JAX-WS Web Service and a Client
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
24
The starting point for developing a JAX-WS web service is a Java class annotated with
the javax.jws.WebService annotation. The @WebService annotation defines the class as a web service
endpoint.
The basic steps for creating a web service and client are as follows:
1. Code the implementation class.
2. Compile the implementation class.
3. Package the files into a WAR file.
4. Deploy the WAR file. The web service artifacts, which are used to communicate with clients, are
generated by the GlassFish Server during deployment.
5. Code the client class.
6. Use a wsimport Ant task to generate and compile the web service artifacts needed to connect to
the service.
7. Compile the client class.
8. Run the client.
CREATING AND USING WEBSERVICES
1. new project
2. choose java web-->web application
3. give name to project (myfirstwebservice)
4. select server (glassfish or tomcat)
5. click finish
6. right click on project-->new-->web service
7. give name to webservice (sidwebservice) and package (weit.org) "here webservice will have
hello sample method by default"
8. now right click on project and deploy
9. now in project you will able to see web services folder (inside you will able to see sidwebservice)
right click and test websevice
10. now in browser you will able to see wsdl file output with hello button and textbox(copy the wsdl
url)
11. our webservice server is ready dont stop deployment keep it running
12. now we have to create a client or subscriber to consume server
13. preparing client
14. new project
15. choose java web-->web application
16. give name to project (retrivingwebservice)
17. select server (glassfish or tomcat)
18. click finish
19. now right click on project-->new-->webserviceclient
20. now in wsdl url paste (copy the wsdl url)
21. now in web pages create a jsp file (right click on web pages-->add-->jsp)
22. new drag and drop webservice from (web service references) to jsp page
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
25
23. now pass a parameter to webservice and print the result as given above
24. now right click on jsp page and run the page.
25. now on browser you will able to see the output which is returned from web service.
Registering and Discovering Web Services
webref:
https://pdfs.semanticscholar.org/presentation/b6e3/41c606a9b155054ac67cb6a16510720797f6.pdf
Service registries
To exploit the full potential of e-business, organizations must be able to discover each other, make their
needs and capabilities known, and compose Web services from diverse organizations into new services
and business processes.
This solution requires the creation of a service registry architecture that enables enterprises to
introduce a global, platform-independent, open framework for businesses to
(i) discover each other,
(ii) define how they interact over the Internet, and
(iii) share information in a global registry that will more rapidly accelerate the global adoption of e-
business.
Service registries are all about visibility and control. At the simplest level, a service registry keeps track
of what services an organization has and characteristics of those services.
two types of e-business registries can be discerned
document-based
A document-based service registry enables its clients to publish information by storing
XML-based service documents, such as business profiles or technical specifications
(including WSDL descriptions of the service), in the registry.
metadata-based
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
26
Metadata is stored in the service registry and is used by the registry to provide meaningful
attachments to its descriptive documents, which are made persistent in the storage facility of the
service registry.
advanced registry offers several appealing characteristics
• Maximizes Web services reuse and encourages broad usage by all potential users in an SOA
solution.
• Creates a management and governance structure to grow and sustain a successful SOA
implementation.
• Contains all the metadata about Web services and their associated objects. It also contains
information about service providers, consumers, and their relationships.
• Provides general- and special-purpose interfaces that address the needs of providers,
consumers, administrators, and operators.
• Ensures that the evolving SOA can handle the growing number of services and service
consumers and quickly adapt to changing business requirements.
Service discovery
Service discovery is an important element of an SOA(service-oriented architecture)
Service discovery is the process of locating Web service providers, and retrieving Web service
descriptions that have been previously published.
two basic types of service discovery
static
Static service discovery generally occurs at design time
dynamic
dynamic discovery occurs at run-time
UDDI Universal Description, Discovery, and Integration
To address the challenges of service registration and discovery, the Universal Description, Discovery, and
Integration specification was created. UDDI is a cross-industry initiative to create a registry standard for
Web service description and discovery together with a registry facility that supports the publishing and
discovery processes.
UDDI enables a business to
• describe its business and its services
• discover other businesses that offer desired services
• integrate (interoperate) with these other businesses.
The UDDI specifications take advantage of World Wide Web Consortium (W3C) and Internet Engineering
Task Force (IETF) standards such as XML, HTTP, and Domain Name System (DNS) protocols.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
27
UDDI is designed for use by developer tools and applications that use Web services standards such as
SOAP/XML and WSDL. UDDI provides a global, platform-independent, open framework.
UDDI is a registry that contains relatively lightweight data. As a registry its prime purpose is to provide
network addresses to the resources it describes.
The core concept of the UDDI initiative is the UDDI business registration, an XML document used to
describe a business entity and its Web services.
Conceptually, the information provided in a UDDI business registration consists of three interrelated
components
• “white pages”, including address, contact, and other key points of contact.
• “yellow pages” , the classification of information according to industrial classifications based on
standard industry taxonomies
• “green pages”, the technical capabilities and information about services that are exposed by the
business including references to specifications for Web services and pointers to various file- and
URL-based discovery mechanisms.
The information that is stored in the UDDI registry allows applications and developers to determine who
the business entity represents, what they do, where the services they provide can be found, and how
they can be accessed.
UDDI data structures
For Web services to be meaningful there is a need to provide information about them beyond the
technical specifications of the service itself.
UDDI – main characteristics
UDDI provides a mechanism to categorize businesses and services using taxonomies.
• Service providers can use a taxonomy to indicate that a service implements a specific domain
standard, or that it provides services to a specific geographic area
• UDDI uses standard taxonomies so that information can be discovered on the basis of
categorization.
UDDI business registration
• an XML document used to describe a business entity and its Web services
UDDI usage model
An enterprise may set up multiple private UDDI registries in-house to support intranet and eBusiness
operations.
Public UDDI registries can be set up by customers and business partners of an enterprise.
Services must be published in a public UDDI registry so that potential clients and service developers can
discover them.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
28
Queries address the following
• Find Web services implementations that are based on a common abstract interface definition.
• Find Web service providers that are classified according to a known classification scheme or
identifier system.
• Issue a search for services based on a general keyword.
• Determine the security and transport protocols supported by a given Web service.
• Cache the technical information about a Web service and then update that information at run-
time.
Overview of UDDI data structures
The UDDI XML schema defines four core types of information that provide the white/yellow/green page
functions.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
29
These are: business entities, business services, binding templates; and information about specifications
for services (technical or tModels)
The UDDI XML schema specifies information about the business entity, e.g., a company, that offers the
service (<businessEntity>), describes the services exposed by the business (<businessService>), and captures
the binding information (<bindingTemplate>) required to use the service.
Service provider information
Partners and potential clients of an enterprise’s services that need to be able to locate information
about the services provided would normally have as a starting point a small set of facts about the service
provider.
The business entity element and business key attribute. The core XML elements for supporting
publishing and discovering information about a business – the UDDI Business Registration – are
contained in an element named <businessEntity>.
The discovery URLs element. This is an optional element and contains the URLs that point to alternate
Web addressable (via HTTP GET) discovery documents.
The name element. The name element contains the common name of the organization that a business
entity represents. A <businessEntity> may contain more than one name.
The description element. This element is a short narrative description for the business. A <businessEntity>
can contain several descriptions, e.g., in different languages.
The contacts element. This element is an optional list of contact information for the organization
The business services element. This is an optional list containing information describing logical families
of the business services that this business entity provides.
The identifier bag element. In addition to the descriptive information the UDDI registry provides
information about enterprises and their services
The category bag element. A <categoryBag> element is similar to the <identifierBag>. This element is a list of
one or more <keyedReference> structures that tag the business entity with specific classification
information, e.g., industry, product, or geographic codes.
Example – Business entity
<businessEntity businessKey="d2300-3aff-.." xmlns = “urn:uddi-org:api_v2”>
<name xml: lang="en"> Automotive Equipment Manufacturing Inc. </name>
<description xml: lang="en">
Automotive Equipment, Accessories and Supplies for European firms
</description>
<contacts>
<contact useType="Sales Contact">
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
30
<description xml: lang="en"> Sales Representative </ description>
<personName> Reginald Murphy </personName>
<email useType="primary"> joe.murphy@automeq.com </email>
<address useType="http">
<addressLine> http://www.medeq.com/sales/ </addressLine>
</address>
</contact>
</contacts>
<businessServices>
<!-- Business service information goes here -->
</businessServices>
<identifierBag>
<!-- DUNS Number identifier System -->
<keyedReference keyName="DUNS Number" keyValue="…" tModelKey="…"/>
</identifierBag>
<categoryBag>
<!—North American Industry Classification System (NAICS) -->
<keyedReference keyName="Automotive parts distribution" keyValue="…" tModelKey="…"/>
……
</categoryBag>
</businessEntity>
Business service
The services provided by a business entity are described in business terms using businessService
elements.
A businessEntity can have several businessServices but a businessService belongs to one businessEntity.
A businessService contains:
• a serviceKey that uniquely identifies the service and the businessEntity (not necessarily the
same as where the businessService is found)
• name: as before
• description: as before
• categoryBag: as before
• bindingTemplates: a list to all the bindingTemplates for the service with the technical
information on how to access and use the service.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
31
example : business service
<businessServices>
<businessService serviceKey=" ">
<name> Search the Automotive Equipment Manufacturing parts Registry </name>
<description lang="en">
Get to the Automotive Equipment Manufacturing parts Registry
</description>
<bindingTemplates>
<bindingTemplate bindingKey="..">
<description lang="en">
Use your Web Browser to search the parts registry
</description>
<accessPoint URLType="http">
http://www.automeq.com/b2b/actions/search.jsp
</accessPoint>
<tModelInstanceDetails>
<tModelInstanceInfo
tModelKey=”uddi:..”/>
<tModelInstanceDetails>
</bindingTemplate>
</bindingTemplates>
</businessService>
</businessServices>
Binding template: “green pages”
A binding template contains the technical information associated to a particular service:
• bindingKey
• serviceKey
• description
• accessPoint: the network address of the service being provided
• tModels: a list of entries corresponding to tModels associated with this particular binding
• categoryBag: additional information about the service and its binding (e.g., whether it is a test
binding, it is on production, etc).
example bindingtemplate
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
32
<bindingTemplate bindingKey="..">
<description lang="en">
Use your Web Browser to search the parts registry
</description>
<accessPoint URLType="http">
http://www.automeq.com/b2b/actions/search.jsp
</accessPoint>
<tModelInstanceDetails>
<tModelInstanceInfo
tModelKey=”uddi:..”/>
<tModelInstanceDetails>
</bindingTemplate>
tModel
A tModel is a generic container of information which contains technical information associated with the
use of a Web service:
• the actual interface and protocol used, including a pointer to the WSDL description;
• description of the business protocol and conversations supported by the service.
example tmodel
<tModel tModelKey="…" >
<name> RosettaNet-Org </name>
<description xml:lang="en">
Supports a process for trading partners to request and
provides quotes
</description >
<overviewDoc>
<description xml:lang="en">
This compressed file contains the specification in a word
document, the html guidelines document, and the XML schemas.
</ description>
<overviewURL>
http://www.rosettanet.org/rosettanet/Doc/0/
K96RPDQA97A1311M0304UQ4J39/3A1_RequestQuote.zip
</overviewURL>
</overviewDoc>
<categoryBag>
<keyedReference keyName="Trading quote request and
provision"
keyValue="80101704" tModelKey=" ….."/>
</categoryBag>
</tModel>
The publisher assertion structure
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
33
A <publisherAssertion> structure defines relationships between pairs of <businessEntity> structures. Two (or
more) related enterprises may use the <publisherAssertion> structure to publish assertions of business
relationships, which are mutually acceptable to both parties
example of publisherAssertion
<publisherAssertion>
<fromKey> FE565 … <fromKey>
<toKey> A237B … <toKey>
<keyedReference tModelKey="uuid:807A .. " />
keyName="subsidiary"
keyValue="parent-child">
</ keyedReference >
</publisherAssertion>
WSDL to UDDI mapping model
The service desc. in WSDL documents is complementary to the information found in UDDI
business/service entries.
These two constructs work together naturally.
• UDDI and WSDL distinguish clearly between interface and implementation.
• By decoupling a WSDL specification and registering it in UDDI, we can populate UDDI with
standard interfaces that have multiple implementations, providing a landscape of business
applications that share interfaces.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
34
Mapping WSDL to UDDI
The UDDI API
A UDDI registry offers a standard mechanism to classify, catalogue, and manage Web services, so that
they can be discovered and consumed.
The UDDI API is an interface that accepts XML messages wrapped in SOAP envelopes
• UDDI provides application program interfaces (APIs) for access to a UDDI system:
• UDDI inquiry: to locate and find details about entries in a UDDI registry. Supports a number of
patterns (browsing, drill-down).
• UDDI publication: to publish and modify information in a UDDI registry.
• UDDI security: for access control to the UDDI registry (token based).
• UDDI subscription: for clients to subscribe to changes of information in the UDDI registry.
• UDDI replication: to perform replication of information across nodes in a UDDI registry.
• UDDI custody and ownership transfer: to change the owner (publisher) of information.
All UDDI interactions use a request/response model, in which each message requesting a service from a
UDDI registry generates some kind of response. The UDDI specifications allow two types of exchanges
with UDDI-registered sites: enquiries and publishing.
• The enquiry API is used to search and read data in a UDDI registry, while the
• publishing API is used to add, update, and delete data in a UDDI registry.
Enquiry API
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
35
Requestors can obtain information from a UDDI registry using its enquiry interface.
Enquiries enable trading organizations to find businesses, services, or technical characteristics meeting
certain criteria.
• Browse functions search the registry based on keywords and return summary lists with overview
information (key, name, and description) about matching businesses or services.
• Find qualifiers are used to sort the results and to control the keyword matching.
o To minimize the number of requests, find queries can be nested.
• Drill-down functions fetch the specific UDDI data structures about particular entries given their
key, returned by the Browse functions.
Publishing API
o The publishing interface can be used by clients to store and update information contained in a
UDDI registry.
o The registry performs access control for all publishing functions: information about the entries
can only be edited by the owner.
o Category information and keyed references associated with the entries are validated before
accepting new information into the registry.
o Save operations allow a client to add or update information in the UDDI.
Querying the UDDI model
The sample queries described in this section are based on the enquiry API and can be issued at
design/build time or at run-time, depending on the type of application being developed.
o Finding business entities by name.
o Finding <businessEntity> entries by category.
o Finding the <tModel> for <portType> name.
o Find all <binding tModel> for PurchaseOrderPortType.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
36
UDDI usage model and deployment variants
Business information provider roles
Registry operators:
o organizations (operator nodes) that host and operate the UDDI business registry (UBR).
o These manage and maintain the directory information, cater for replication of business
info. and other directory-related functions.
o The registry works on a “register once, published everywhere” principle.
Standard bodies and industry consortia:
• these publish descriptions in the form of service type definitions (s).
o These s do not contain the actual service definitions, instead they have a URL that points
to the location where the service descriptions (usually in WSDL) are stored.
Service providers:
• commonly implement Web services conforming to service type definitions supported by UDDI.
o They publish information about their business and services in the UDDI.
o The published data also contains the end point of Web services
UDDI deployment possibilities
o e-marketplace UDDI: an e-marketplace, a standards body, or a consortium of organizations that
participate and compete in the industry can host this private UDDI node
o Business partner UDDI registry: a private UDDI node hosted behind one of the business
partner’s firewall and only trusted or vetted partners can access the registry
o Portal UDDI: this type of deployment is on an enterprise’s firewall and is a private UDDI node
that contains only meta-data related to the enterprise’s Web services.
o Internal UDDI: this allows applications in different departments of the organization to publish
and find services, and is useful for large organizations.
Service-oriented architectures
The challenges in automated business integration have fueled new approaches and architectures to
address the requirements of loosely coupled, standards-based, and protocol-independent distributed
computing applications culminating in the introduction of the service-oriented architecture.
What is a software architecture
Building distributed software systems involves fitting together resources and systems from diverse
organizations as well as developing implementation code
Software architecture of a computing system involves the description of the structures from which
systems are built (software components), the externally visible properties of those components, their
interrelationships as well as principles and guidelines governing their design and evolution over time.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
37
software architecture is the high-level structure of a software system –including distributed and service-
oriented systems – that is commonly specified in terms of functional components and
interactions/interconnections among those components. Components are identified and assigned
responsibilities that client components interact
with through “contracted” interfaces.
Important properties of software architecture include
o It is at a high-enough level of abstraction that the system can be viewed as a whole and yet it
must provide enough information to form a basis for analysis, decision making, and hence risk
reduction
o The structure must support the functionality required of the system. Thus, the dynamic
behavior of the system must be taken into account when designing the architecture.
o It must conform to the system qualities (captured in SLAs or non-functional requirements).
These likely include performance, security, interoperability, and reliability
System quality attributes
While the design of software systems concentrates on satisfying the functional requirements for a
system, the design of the software architecture for systems concentrates on the non-functional or
quality requirements of systems.
Quality requirements of systems are described in terms of quality attributes, which are those system
properties over and above the functionality of the system that determine the technical qualities of the
system.
There are two types of quality attributes
o Run-time qualities provide value to the user and have more to do with short-term competitive
differentiation
o Development-time qualities, for the most part, provide business value (as opposed to direct
value to the end user) and have to do with the long-term competitiveness of the business.
Common architectural concerns
• Meta-architecture: This is a set of architectural vision, style, principles, key communication and
control mechanisms, and concepts that results in high-level decisions that will strongly influence
the integrity and structure of the system.
• Architectural patterns: Over time, software developers distinguish patterns in the way that
systems are structured, and as these patterns become widespread they become dominant
designs. Patterns allow the architect to start with a problem and a vision for the solution, and
then find a pattern that fits that vision.
• Architectural views: Software architectures are best envisioned in terms of a number of
complementary views or models.
• System decomposition principles and good interface design: These identify the high-level
components of the system and the relationships among them. Their purpose is to direct
attention at an appropriate decomposition of the system without delving into unnecessary
details.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
38
• Key architectural design principles: These include abstraction, separation of concerns,
postponing decisions, and simplicity, and related techniques such as interface hiding and
encapsulation.
SOA revisited
SOA is a meta-architectural style that supports loosely coupled services to enable business flexibility in
an interoperable, technologyagnostic manner.
In SOA, business-aligned services are used as the basis for constructing flexible and dynamically
reconfigurable end-to-end business processes.
SOA is focused on creating a design style, technology, and process framework that will allow enterprises
to develop, interconnect, and maintain enterprise applications and services efficiently and cost-
effectively.
Services in an SOA exhibit the following characteristics
• All functions in an SOA are defined as services
• All services are independent of each other
• Service interfaces are invokable
SOA’s loose-coupling principles
• guide planning,
• development,
• integration, and
• management of their network application
Service roles in an SOA
SOAs and Web services solutions include two well-known key roles:
• a service requestor (client) and
o Service Consumers make a request for a service in the SOA registry. Universal
Description, Discovery and Integration (UDDI) standard is used for locating a service in
the registry.
• service provider
• Service Producers register their service in the SOA registry. Web Services Description
Language (WSDL) is used to describe a service.
Reliable messaging
Unfortunately, the core SOAP specification does not provide reliability mechanisms addressing such
complex message routing requirements. Therefore, there is a clear need for more robust SOAP-based
messaging specifications to guarantee that messages are being received by their intended recipients and
that message addressing remains consistent despite the fact that messages might be routed to Web
services implemented on different platforms
Definition and scope of reliable messaging
Reliability at the level of messages is often referred to as reliable messaging
When specifying reliable messaging features there are three aspects that must be addressed equally
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
39
• both the sender and recipient of a message know whether or not a message was actually sent
and received, and that the message received is the same as the one sent.
• we need to make sure that the message was sent once and only once to the intended recipient
• we need to guarantee that the received messages are in the same order as they were sent
WS-ReliableMessaging
WS-ReliableMessaging provides a protocol for ensuring that unreceived and duplicate SOAP messages
can be detected and received messages can be processed in the order in which they were sent.
The WS-ReliableMessaging protocol depends upon other Web services specifications for the
identification of service endpoint addresses and policies.
The WS-ReliableMessaging standard has been developed to provide a framework for interoperability
between different reliable transport infrastructures
WS-ReliableMessaging protocol determines invariants maintained by the reliable messaging endpoints
and the directives used to track and manage the delivery of a sequence of messages.
WS-ReliableMessaging provides an interoperable protocol that a reliable messaging source and reliable
messaging destination use to provide the application source and the application destination with a
guarantee that a message that is sent will be delivered.
WS-ReliableMessaging distinguishes two important traits:
1. The reliability protocol between message handlers(sequence is maintained)
2. The reliability QoS contract(assured delivery)
There are four basic delivery assurances that endpoints provide and are supported by WS-
ReliableMessaging
• AtLeastOnce Delivery: This feature guarantees that every message sent will be delivered or an
error will be raised on at least one endpoint. Some messages may be delivered more than once.
• AtMostOnce Delivery: This feature guarantees that every message will be delivered at most
once without duplication or an error will be raised on at least one endpoint. It is possible that
some messages in a sequence may not be delivered.
• ExactlyOnce Delivery: This feature guarantees that every message sent will be delivered
without duplication or an error will be raised on at least one endpoint. This delivery assurance is
the logical AND of the two prior delivery assurances.
• InOrder Delivery: This feature enforces the delivery of a sequence of messages at the
destination, in the same order as the submission order by the sending application. This delivery
assurance says nothing about duplications or omissions.
Structure of WS-ReliableMessaging
• Sequences: The protocol uses the <Sequence> element to identify and track a group of messages
• Message numbers: This numbering scheme makes it simple to detect missing or duplicate
messages, and simplifies acknowledgement generation and processing.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
40
• Acknowledgements: An acknowledgement is an indication that a message was successfully
transferred to its destination.
Enterprise Service Bus
The Enterprise Service Bus is an open standards-based message backbone designed to enable the
implementation, deployment, and management of SOA-based solutions with a focus on assembling,
deploying, and managing distributed service-oriented architectures.
An ESB is a set of infrastructure capabilities implemented by middleware technology that enable an SOA
and alleviate disparity problems between applications running on heterogeneous platforms and using
diverse data formats. The ESB supports service invocations, message, and event-based interactions with
appropriate service levels and manageability.
ESB distributed processing infrastructure is aware of applications and services and uses content-based
routing facilities to make informed decisions about how to communicate with them.
ESB connecting diverse applications and technologies
To successfully build and deploy a distributed SOA, there are five design/deployment and management
aspects that need to be addressed first:
• Service analysis and design: A service development methodology should be used to enable
service-oriented development and the reuse of existing applications and resources.
• Service enablement: The service development methodology should determine which discrete
application elements need to be exposed as services.
• Service orchestration: Distributed services need to be configured and orchestrated in a unified
and clearly defined distributed process.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
41
• Service deployment: Emphasis should also be placed on the production environment that
addresses security, reliability, and scalability concerns.
• Service management: Services must be audited, maintained, and reconfigured and
corresponding changes in processes must be made without rewriting the services or underlying
application.
Key capabilities of an ESB
Dynamic connectivity capabilities: Dynamic connectivity is the ability to connect to Web services
dynamically without using a separate static API or proxy for each service.
Reliable messaging capabilities: Reliable messaging can be primarily used to ensure guaranteed
delivery of these messages to their destination and for handling events.
Topic- and content-based routing capabilities: The ESB should be equipped with routing mechanisms to
facilitate not only topic-based routing, but also more sophisticated content-based routing.
Transformation capabilities: A critical ability of the ESB is the ability to route service interactions
through a variety of transport protocols, and to transform from one protocol to another where
necessary.
Service enablement capabilities: Service enablement includes the ability to access already existing
resources such as legacy systems
Security capabilities: Generically handling and enforcing security is a key success factor for ESB
implementations. The ESB needs both to provide a security model to service consumers and to integrate
with the (potentially varied) security models of service providers.
Integration capabilities: To support SOA in a heterogeneous environment, the ESB needs to integrate
with a variety of systems that do not directly support service-style interactions.
ESB integration styles
Integration at the presentation tier. Integration at the presentation tier is concerned with how the
complete set of applications and services a given user accesses. ESB can provide one face to the users
resulting in consistent user experience, with unified information delivery while allowing underlying
applications to remain distributed.
Application connectivity. Application connectivity is an integration style concerned with all types of
connectivity that the ESB integration layer must support.
Application connectivity has to deal with the following types of integration:
1. Application integration: Application integration is concerned with building and evolving an
integration backbone capability that enables fast assembly and disassembly of various platform
and component technologies.
2. Business process integration: Process integration is concerned with the development of
automated processes that map to and provide solutions for business processes, integration of
existing applications into processes, and integrating processes with other processes.
3. Business data integration: Data integration is the process of providing consistent access to
business data in the enterprise, by all the applications that require it, in whatever form they
need it, without being restricted by the format, source, or location of the data.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
42
4. Integration design and development methodology: One of the requirements for the application
development environment must be that it takes into account all the styles and levels of
integration that could be implemented within the enterprise, and provides for their
development and deployment.
Integration brokers
To integrate disparate business applications one must concentrate on the characteristics and functions
of integration brokers.
Application servers
Another critical middleware infrastructure used in connection with ESBs is application servers.
Application servers offer an integrated development environment for developing and deploying
distributed Web- and non-Web-based applications and services.
Application servers typically provide Web connectivity for extending existing solutions and bring
transaction processing mechanisms to the Web.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
43
Connectivity and translation infrastructure
There are three alternative ways an application can exchange information with the ESB include
• Application-provided Web services interface: Some applications and legacy application servers
have adopted the open standards philosophy and have included a Web services interface.
• Service wrapper as interface to adapter: In some cases the adapter may not supply the correct
protocol (JMS, for example) that the ESB expects. In this case, the adapter would be Web
services enabled.
Leveraging legacy assets
Legacy applications are critical assets of any modern enterprise as they provide access to mission-critical
business information and functionality and thus control the majority of an organization’s business
processes.
The primary focus of legacy re-engineering and transformation is enterprises, business processes, the
EAI, and how a legacy system can contribute to implementing the architecture without propagating the
weaknesses of past designs and development methods.
most fundamental form the process of re-engineering includes three basic tenets
• understanding of an existing application, resulting in one or more logical descriptions of the
application
• restructuring or transformation of those logical descriptions into new, improved logical
descriptions;
• development of the new application based on these improved logical descriptions
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
44
Scalability issues in an ESB
For example, parallel execution of business operations and itinerary-based routing significantly
contribute to the highly distributed nature of the ESB, as there is no centralized rules engine to refer
back to for each step in the process. The use of asynchronous communications, message itineraries,
message and process definitions allow different parts of the ESB to operate independently of one
another.
This results in a decentralized model providing complete flexibility in scaling any aspect of the
integration network. Such a decentralized architecture enables independent scalability of individual
services as well as the communications infrastructure itself.
Integration patterns using an ESB
integration service can manage stateful information about a business process that spans a considerable
length of time. For example, a step in the business process may require human interaction, such as
approval of a purchase order or of a new supplier.
A business process integration pattern is the preferred solution for most ESB applications because it
offers many advantages. Its single drawback is dealing with sometimes excess process complexity.
The extended SOA
Extended SOA consists of two SOA implementations: internal and external.
Extended SOA implementation, can recognize the following services
• Foreign Services
o They represent services served by other systems of the external SOA. These services
communicate with the middleware only and they are out of scope of our
implementation.
• Middleware
o It acts as a service consumer part of external SOA implementation. The middleware is
responsible for communication between all foreign services and our External
Application Services and it is out of scope of our implementation.
• External Application Services
o They act as service providers for the middleware and as service consumers for Internal
Application Services. These services combine and connect both SOA implementations.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
45
• Internal Application Services
o They serve core functionality of the application acting as service providers for External
Application Services and as service consumers for Basic Application Services.
• Basic Application Services
o They serve basic functionality of the application simplifying the build process of Internal
Application Services (Add, Update, Delete, etc.). They act as service providers for
Internal Application Services.
Web services development lifecycle
System development lifecycle
System development lifecycle (SDLC) is the overall process of designing and developing software
systems through a multi-step process from investigation of initial requirements through analysis, design,
implementation, and maintenance.
The simplest rendition of system development projects is the “waterfall” methodology. This
methodology usually has five identifiable phases:
analysis, design, implementation, testing, and maintenance.
A more recent software development process is the rational unified process (RUP) whose aim is to
support the analysis and design of iterative software development.
Architecture of RUP
Basic SOA model is divided into six major layers of abstraction:
domains, business processes, business services, infrastructure services, service realizations, and
operational systems.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
46
Service-oriented design and development milestones
• Reusing existing functionality: Service-oriented solutions target reuse of existing functionality
and assets such as prepackaged application suites, specialpurpose built components,
commercial off-the-shelf (COTS) applications or legacy applications, within new applications and
policy-based computing.
• Minimizing costs of disruption: The adoption of specific “integration logic” functionality that
enables orchestration of existing, working technology in the form of services results in
minimizing the costs associated.
• Employing an incremental mode of integration: One of the key benefits of the serviceoriented
approach is that integration can be delivered on a gradual, requirements driven basis, but yet
still amount to a cohesive whole in the long term.
• Providing increased flexibility: Service-oriented solutions provide the ability to quickly and
easily evolve and adapt applications in order to meet changing business requirements and new
technologies.
• Providing scalability: making it potentially possible to process large applications more quickly
by spreading the load of processing across many servers.
Quality of service-oriented design and development
Service coupling
One way of measuring service design quality is coupling, or the degree of interdependence
between two business processes.
The objective is to minimize coupling: that is, to make (self-contained) business processes as
independent as possible by not having any knowledge of or relying on any other business
processes.
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
47
Coupling can be achieved by reducing the number of connections between services in a business
process, eliminating unnecessary relationships between them, and by reducing the number of
necessary relationships – if possible.
coupling partitioned along the following dimensions:
• Representational coupling: Business processes should not depend on specific
representational or implementation details ,Representational coupling is useful for
supporting.
o Interchangeable/replaceable services : Existing services may be swapped with
new service implementations
o Multiple service versions : Different versions of a service may work best in parts
of a business processes depending on the application’s needs.
• Identity coupling: Connection channels between services should be unaware of who is
providing the service.
• Communication protocol coupling: A sender of a message should rely only on those
effects necessary to achieve effective communication.
Service cohesion
Cohesion is the degree of the strength of functional relatedness of operations within a service.
• Functional service cohesion: A functionally cohesive business process should perform one
and only one problem-related task and contain only services necessary for that purpose.
• Communicational service cohesion: A communicationally cohesive business process is one
whose activities and services use the same input and output messages.
• Logical service cohesion: tasks of the same general category by performing a set of
independent but logically similar functions
Service granularity
Service granularity refers to the scope of functionality exposed by a service. Services may exhibit
different levels of granularity.
Functionality associated with the chosen business entity belongs within the service's functional
boundary. The larger the quantity of related functionality, the coarser the service granularity.
Conversely, services with more narrow or targeted functional contexts will tend to have a finer
grained level of service granularity.
level of service granularity is set by the service's functional context, not by the actual amount of
functionality that resides within the physically implemented service.
Overview of Web services development lifecycle
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
48
Phases of the service-oriented design and development methodology
planning phase
The planning phase constitutes a preparatory phase that serves to streamline and organize consequent
phases in the methodology. During this phase, the project feasibility, goals, rules, and procedures are set
and requirements are gathered.
analysis phase
reviewing the business goals and objectives of an enterprise that drive the development of business processes.
• “As-is” process model analysis
“as-is” process model to allow the various stakeholders to understand the portfolio of available
applications and business processes.
o Portfolio analysis: assigning candidates and prioritized according to their technical quality
and business value.
o Cost estimation: estimate the cost of the re-engineering project
o Cost–benefit analysis: cost of re-engineering is compared to the expected maintenance cost
savings and value increases
• Business service identification
o Understanding how a business process works and how component functionality differs or can
get adjusted between applications is an important milestone when trying to identify suitable
business process candidates.
• Business service scoping
o Defining the scope of business processes helps ensure that a process does not become
monolithic and mimic an entire application.
• Business service gap analysis
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
49
o A gap analysis strategy may be developed in stages and results in a recommendation to do
development work, reuse, or purchase Web services.
• Business service realization analysis
o describes at a high level how a Web service usage interface could be connected to a portfolio
of existing services and service-enabled applications which are assembled to form service
orchestration specification interfaces.
The service design phase
This phase is logically succeeded by service design, during which conceptual processes and services
are transformed from abstract entities into a set of concrete service interfaces.
Service design concerns
concerns include managing service granularity, designing for service reuse, and designing for service
composability.
• Managing service and component granularity
Services analysis provides an initial granularity assessment based on the top-down logical
analysis of services functionality and scope, which can be used as a starting point for
designing concrete service interfaces.
• Designing for service reusability
designing services it is important to be able to design them for reuse so that they can
perform a given function wherever this function is required within an enterprise
• Designing for service composability
principles that guarantee that services are self-contained, modular, and support service
composability
Specifying services
• A structural specification: This focuses on defining the service types, messages, port types, and
operations.
• A behavioral specification: This entails understanding the effects and side effects of service operations
and the semantics of input and output messages.
• A policy specification: In addition to service syntax and semantics, QoS considerations must also be
addressed.
Specifying business processes
Describing the business process structure
The business process structure refers to the logical flow or progression of a business process
process encompasses the following tasks:
1. Identify, group, and describe the activities and services that together implement a
business process
2. Describe activity dependencies, conditions, or synchronization
3. Describe the implementation of the business process
Describing business roles
identify responsibilities associated with business process activities and the roles that are
responsible for performing them
Specifying service policies
TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES
FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES
WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in
50
Business constraints, Technology constraints, Run-time qualities
The service construction phase
Constructing a service: the provider perspective
1. There is an already existing implementation (service content) for the Web service, e.g., in
Java code. By using this implementation the developer can build the service definition
(WSDL document).
2. A service definition already exists in the form of a WSDL document. By using this WSDL
document the designer can build or adapt the implementation (Java) code to realize that
service.
Constructing services: the client perspective
1. A static client is created at construction time by locating the service implementation
definition for the single Web service that will be used by the service requestor.
2. A dynamic client is used when a service requestor wants to use a specific type of Web
service with a known service definition whose implementation is not known until run-time
or can change at run-time.
The service test phase
Service testing is generally characterized as a validation exercise at the physical level, ascertaining
that requirements have been met and that the deliverables are at an acceptable level and in
accordance with existing standards during the analysis, design, and construction phases of the
services lifecycle.
• Functional testing covers how well the service executes the functions it is expected to
execute
• performance testing in service-oriented environments is monitoring service on-line response
times and transaction rates under peak workload conditions
• interface testing is to ensure that any service is developed to properly interface with other
service functions outside of its surrounding process.
• assembly testing ensures that all services function properly when assembled into business
processes.
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES
TYBSC CS 2018 WEB SERVICES NOTES

Contenu connexe

Tendances

E-Commerce website IT project PPT
E-Commerce website IT project PPTE-Commerce website IT project PPT
E-Commerce website IT project PPTMD HAFIZ
 
ACN Microproject .pdf
ACN Microproject .pdfACN Microproject .pdf
ACN Microproject .pdfNayyarKhan8
 
Internet of Things: Protocols for M2M
Internet of Things: Protocols for M2MInternet of Things: Protocols for M2M
Internet of Things: Protocols for M2MCharles Gibbons
 
Active and Passive Network Attacks
Active and Passive Network AttacksActive and Passive Network Attacks
Active and Passive Network AttacksPradipta Poudel
 
Lecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading schemeLecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading schemeMubashir Ali
 
Scheduling in Cloud Computing
Scheduling in Cloud ComputingScheduling in Cloud Computing
Scheduling in Cloud ComputingHitesh Mohapatra
 
Information and network security 8 security mechanisms
Information and network security 8 security mechanismsInformation and network security 8 security mechanisms
Information and network security 8 security mechanismsVaibhav Khanna
 
Multimedia system, Architecture & Databases
Multimedia system, Architecture & DatabasesMultimedia system, Architecture & Databases
Multimedia system, Architecture & DatabasesHarshita Ved
 
Distributed computing
Distributed computingDistributed computing
Distributed computingshivli0769
 
Chat application android app ppt
Chat application android app pptChat application android app ppt
Chat application android app pptZreena
 
E-commerce documentation
E-commerce documentationE-commerce documentation
E-commerce documentationSohel Parvez
 
Online Shopping Full Project Presentation (20 slides)
Online Shopping Full Project Presentation (20 slides)Online Shopping Full Project Presentation (20 slides)
Online Shopping Full Project Presentation (20 slides)Krishna Mohan Shakya
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Design Goals of Distributed System
Design Goals of Distributed SystemDesign Goals of Distributed System
Design Goals of Distributed SystemAshish KC
 
Applications of Distributed Systems
Applications of Distributed SystemsApplications of Distributed Systems
Applications of Distributed Systemssandra sukarieh
 
Web Vulnerability Scanner project Report
Web Vulnerability Scanner project ReportWeb Vulnerability Scanner project Report
Web Vulnerability Scanner project ReportVikas Kumar
 

Tendances (20)

E-Commerce website IT project PPT
E-Commerce website IT project PPTE-Commerce website IT project PPT
E-Commerce website IT project PPT
 
ACN Microproject .pdf
ACN Microproject .pdfACN Microproject .pdf
ACN Microproject .pdf
 
Internet of Things: Protocols for M2M
Internet of Things: Protocols for M2MInternet of Things: Protocols for M2M
Internet of Things: Protocols for M2M
 
Overview of IoT and Security issues
Overview of IoT and Security issuesOverview of IoT and Security issues
Overview of IoT and Security issues
 
Active and Passive Network Attacks
Active and Passive Network AttacksActive and Passive Network Attacks
Active and Passive Network Attacks
 
Lecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading schemeLecture-1: Introduction to web engineering - course overview and grading scheme
Lecture-1: Introduction to web engineering - course overview and grading scheme
 
Web 3.0?
Web 3.0?Web 3.0?
Web 3.0?
 
Web Engineering
Web EngineeringWeb Engineering
Web Engineering
 
Scheduling in Cloud Computing
Scheduling in Cloud ComputingScheduling in Cloud Computing
Scheduling in Cloud Computing
 
Information and network security 8 security mechanisms
Information and network security 8 security mechanismsInformation and network security 8 security mechanisms
Information and network security 8 security mechanisms
 
Multimedia system, Architecture & Databases
Multimedia system, Architecture & DatabasesMultimedia system, Architecture & Databases
Multimedia system, Architecture & Databases
 
Distributed computing
Distributed computingDistributed computing
Distributed computing
 
Chat application android app ppt
Chat application android app pptChat application android app ppt
Chat application android app ppt
 
E-commerce documentation
E-commerce documentationE-commerce documentation
E-commerce documentation
 
Online Shopping Full Project Presentation (20 slides)
Online Shopping Full Project Presentation (20 slides)Online Shopping Full Project Presentation (20 slides)
Online Shopping Full Project Presentation (20 slides)
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Joomla and cms
Joomla and  cmsJoomla and  cms
Joomla and cms
 
Design Goals of Distributed System
Design Goals of Distributed SystemDesign Goals of Distributed System
Design Goals of Distributed System
 
Applications of Distributed Systems
Applications of Distributed SystemsApplications of Distributed Systems
Applications of Distributed Systems
 
Web Vulnerability Scanner project Report
Web Vulnerability Scanner project ReportWeb Vulnerability Scanner project Report
Web Vulnerability Scanner project Report
 

Similaire à TYBSC CS 2018 WEB SERVICES NOTES

E commerce technologies
E commerce technologiesE commerce technologies
E commerce technologiesAnne ndolo
 
e-commerce systems and infrastructure.pdf
e-commerce systems and infrastructure.pdfe-commerce systems and infrastructure.pdf
e-commerce systems and infrastructure.pdfpetermulei3
 
SDN Federation White Paper
SDN Federation White PaperSDN Federation White Paper
SDN Federation White PaperBrian Hedstrom
 
Web Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business ProcessesWeb Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business ProcessesMustafa Salam
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...ijcseit
 
CONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCYCONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCYijcseit
 
Configuration inerpsaas multi tenancy
Configuration inerpsaas multi tenancyConfiguration inerpsaas multi tenancy
Configuration inerpsaas multi tenancyijcseit
 
Module1 Mobile Computing Architecture
Module1 Mobile Computing ArchitectureModule1 Mobile Computing Architecture
Module1 Mobile Computing Architectureraksharao
 
Chapter 2 - Enterprise Application Integration.pdf
Chapter 2 - Enterprise Application Integration.pdfChapter 2 - Enterprise Application Integration.pdf
Chapter 2 - Enterprise Application Integration.pdfKhairul Anwar Sedek
 
Connected Banking Framework
Connected Banking FrameworkConnected Banking Framework
Connected Banking FrameworkKashif Akram
 
SOA Fundamentals
SOA  FundamentalsSOA  Fundamentals
SOA Fundamentalsabhi1112
 
A Test-Bed For The Correlation Center Of Digital Services
A Test-Bed For The Correlation Center Of Digital ServicesA Test-Bed For The Correlation Center Of Digital Services
A Test-Bed For The Correlation Center Of Digital ServicesJoe Andelija
 
Falcon Security Essay
Falcon Security EssayFalcon Security Essay
Falcon Security EssayJennifer Wood
 

Similaire à TYBSC CS 2018 WEB SERVICES NOTES (20)

E commerce technologies
E commerce technologiesE commerce technologies
E commerce technologies
 
e-commerce systems and infrastructure.pdf
e-commerce systems and infrastructure.pdfe-commerce systems and infrastructure.pdf
e-commerce systems and infrastructure.pdf
 
Middleware Technologies ppt
Middleware Technologies pptMiddleware Technologies ppt
Middleware Technologies ppt
 
As044285288
As044285288As044285288
As044285288
 
integeration
integerationintegeration
integeration
 
SDN Federation White Paper
SDN Federation White PaperSDN Federation White Paper
SDN Federation White Paper
 
Web Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business ProcessesWeb Services-Enhanced Agile Modeling and Integrating Business Processes
Web Services-Enhanced Agile Modeling and Integrating Business Processes
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...
 
CONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCYCONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCY
 
Configuration inerpsaas multi tenancy
Configuration inerpsaas multi tenancyConfiguration inerpsaas multi tenancy
Configuration inerpsaas multi tenancy
 
Module1 Mobile Computing Architecture
Module1 Mobile Computing ArchitectureModule1 Mobile Computing Architecture
Module1 Mobile Computing Architecture
 
Chapter 2 - Enterprise Application Integration.pdf
Chapter 2 - Enterprise Application Integration.pdfChapter 2 - Enterprise Application Integration.pdf
Chapter 2 - Enterprise Application Integration.pdf
 
Web Services Security - Short Report
Web Services Security - Short ReportWeb Services Security - Short Report
Web Services Security - Short Report
 
Connected Banking Framework
Connected Banking FrameworkConnected Banking Framework
Connected Banking Framework
 
SOA Fundamentals
SOA  FundamentalsSOA  Fundamentals
SOA Fundamentals
 
A Test-Bed For The Correlation Center Of Digital Services
A Test-Bed For The Correlation Center Of Digital ServicesA Test-Bed For The Correlation Center Of Digital Services
A Test-Bed For The Correlation Center Of Digital Services
 
Group- 12.pptx
Group- 12.pptxGroup- 12.pptx
Group- 12.pptx
 
publishable paper
publishable paperpublishable paper
publishable paper
 
Falcon Security Essay
Falcon Security EssayFalcon Security Essay
Falcon Security Essay
 
Cc unit 2 updated
Cc unit 2 updatedCc unit 2 updated
Cc unit 2 updated
 

Plus de WE-IT TUTORIALS

Geographical information system unit 6
Geographical information  system unit 6Geographical information  system unit 6
Geographical information system unit 6WE-IT TUTORIALS
 
Geographical information system unit 5
Geographical information  system unit 5Geographical information  system unit 5
Geographical information system unit 5WE-IT TUTORIALS
 
Geographical information system unit 4
Geographical information  system unit 4Geographical information  system unit 4
Geographical information system unit 4WE-IT TUTORIALS
 
Geographical information system unit 3
Geographical information  system unit 3Geographical information  system unit 3
Geographical information system unit 3WE-IT TUTORIALS
 
Geographical information system unit 2
Geographical information  system unit 2Geographical information  system unit 2
Geographical information system unit 2WE-IT TUTORIALS
 
Geographical information system unit 1
Geographical information  system unit 1Geographical information  system unit 1
Geographical information system unit 1WE-IT TUTORIALS
 
Internet technology unit 5
Internet technology unit 5Internet technology unit 5
Internet technology unit 5WE-IT TUTORIALS
 
Internet technology unit 4
Internet technology unit 4Internet technology unit 4
Internet technology unit 4WE-IT TUTORIALS
 
Internet technology unit 3
Internet technology unit 3Internet technology unit 3
Internet technology unit 3WE-IT TUTORIALS
 
Internet technology unit 2
Internet technology unit 2Internet technology unit 2
Internet technology unit 2WE-IT TUTORIALS
 
Internet technology unit 1
Internet technology unit 1Internet technology unit 1
Internet technology unit 1WE-IT TUTORIALS
 
Internet technology unit 6
Internet technology unit 6Internet technology unit 6
Internet technology unit 6WE-IT TUTORIALS
 
Data warehousing unit 6.1
Data warehousing unit 6.1Data warehousing unit 6.1
Data warehousing unit 6.1WE-IT TUTORIALS
 
Data warehousing unit 5.2
Data warehousing unit 5.2Data warehousing unit 5.2
Data warehousing unit 5.2WE-IT TUTORIALS
 
Data warehousing unit 5.1
Data warehousing unit 5.1Data warehousing unit 5.1
Data warehousing unit 5.1WE-IT TUTORIALS
 
Data warehousing unit 4.2
Data warehousing unit 4.2Data warehousing unit 4.2
Data warehousing unit 4.2WE-IT TUTORIALS
 
Data warehousing unit 4.1
Data warehousing unit 4.1Data warehousing unit 4.1
Data warehousing unit 4.1WE-IT TUTORIALS
 

Plus de WE-IT TUTORIALS (20)

TYBSC CS SEM 5 AI NOTES
TYBSC CS SEM 5 AI NOTESTYBSC CS SEM 5 AI NOTES
TYBSC CS SEM 5 AI NOTES
 
Geographical information system unit 6
Geographical information  system unit 6Geographical information  system unit 6
Geographical information system unit 6
 
Geographical information system unit 5
Geographical information  system unit 5Geographical information  system unit 5
Geographical information system unit 5
 
Geographical information system unit 4
Geographical information  system unit 4Geographical information  system unit 4
Geographical information system unit 4
 
Geographical information system unit 3
Geographical information  system unit 3Geographical information  system unit 3
Geographical information system unit 3
 
Geographical information system unit 2
Geographical information  system unit 2Geographical information  system unit 2
Geographical information system unit 2
 
Geographical information system unit 1
Geographical information  system unit 1Geographical information  system unit 1
Geographical information system unit 1
 
Pm unit 1,2,3,4,5,6
Pm unit 1,2,3,4,5,6Pm unit 1,2,3,4,5,6
Pm unit 1,2,3,4,5,6
 
Internet technology unit 5
Internet technology unit 5Internet technology unit 5
Internet technology unit 5
 
Internet technology unit 4
Internet technology unit 4Internet technology unit 4
Internet technology unit 4
 
Internet technology unit 3
Internet technology unit 3Internet technology unit 3
Internet technology unit 3
 
Internet technology unit 2
Internet technology unit 2Internet technology unit 2
Internet technology unit 2
 
Internet technology unit 1
Internet technology unit 1Internet technology unit 1
Internet technology unit 1
 
Internet technology unit 6
Internet technology unit 6Internet technology unit 6
Internet technology unit 6
 
Data warehousing unit 2
Data warehousing unit 2Data warehousing unit 2
Data warehousing unit 2
 
Data warehousing unit 6.1
Data warehousing unit 6.1Data warehousing unit 6.1
Data warehousing unit 6.1
 
Data warehousing unit 5.2
Data warehousing unit 5.2Data warehousing unit 5.2
Data warehousing unit 5.2
 
Data warehousing unit 5.1
Data warehousing unit 5.1Data warehousing unit 5.1
Data warehousing unit 5.1
 
Data warehousing unit 4.2
Data warehousing unit 4.2Data warehousing unit 4.2
Data warehousing unit 4.2
 
Data warehousing unit 4.1
Data warehousing unit 4.1Data warehousing unit 4.1
Data warehousing unit 4.1
 

Dernier

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Dernier (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

TYBSC CS 2018 WEB SERVICES NOTES

  • 1. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 1 Unit 1 : Web services basics What Are Web Services? A Web service is a self-describing, self-contained software module available via a network, such as the Internet, which completes tasks, solves problems, or conducts transactions on behalf of a user or application. Web services constitute a distributed computer infrastructure made up of many different interacting application modules trying to communicate over private or public networks (including the Internet and Web) to virtually form a single logical system. A Web service can be: 1. a self-contained business task, such as a funds withdrawal or funds deposit service; 2. a full-fledged business process, such as the automated purchasing of office supplies; 3. an application, such as a life insurance application or demand forecasts and stock replenishment; 4. a service-enabled resource, such as access to a particular back-end database containing patient medical records. Web services address the problems of rigid implementations of predefined relationships and isolated services scattered across the Internet. The long-term goal of Web services technology is to enable distributed applications that can be dynamically assembled according to changing business needs, and customized based on device (such as personal computers, workstations, laptops, WAP-enabled cellular phones, personal digital assistants), network (such as cable, UMTS, XDSL, Bluetooth, etc.) and user access while enabling wide utilization of any given piece of business logic wherever it is needed. Once a Web service is deployed, other applications and Web services can discover and invoke it. Web services are loosely coupled software modules: Web services protocols, interfaces, and registry services enable applications to work cooperatively together using the principle of loose coupling. Web services semantically encapsulate discrete functionality: A Web service is a self-contained software module that performs a single task. The module describes its own interface characteristics, i.e., the operations available, the parameters, data typing, and the access protocols, in such a way that other software modules can determine what it does, how to invoke its functionality, and what result to expect in return. Web services can be accessed programmatically: A Web service provides programmable access – this allows embedding Web services into remotely located applications. This enables information to be
  • 2. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 2 queried and updated, thus improving efficiency, responsiveness, and accuracy – ultimately leading to high added value to the Web services clients. Web services can be dynamically found and included in applications: Unlike existing interface mechanisms, Web services can be assembled to serve a particular function, solve a specific problem, or deliver a particular solution to a customer. Web services are described in terms of a standard description language: the Web Services Description Language or WSDL describes both functional as well as nonfunctional service characteristics. Web services are distributed over the Internet: Web services make use of existing, ubiquitous transport Internet protocols like HTTP. Types of Web services Topologically, Web services can come in two flavors 1. Informational, or type I, Web services, which support only simple request/response operations and always wait for a request; they process it and respond. 2. Complex, or type II Web services implement some form of coordination between inbound and outbound operations. Simple or informational services Informational services are services of relatively simple nature. They either provide access to content interacting with an end user by means of simple request/response sequences, or alternatively may expose back-end business applications to other applications. Web services that typically expose the
  • 3. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 3 business functionality of the applications and components that underlie them are known as programmatic services. Informational services can be subdivided into three subcategories 1. Pure content services, which give programmatic access to content such as weather report information, simple financial information, stock quote information, design information, news items, and so on. 2. Simple trading services, which are more complicated forms of informational services that can provide a seamless aggregation of information across disparate systems and information sources, including back-end systems, giving programmatic access to a business information system so that the requestor can make informed decisions. eg: logistic services 3. Information syndication services, which are value-added information Web services that purport to “plug into” commerce sites of various types, such as e-marketplaces, or sell-sites. Typical examples of syndicated services might include reservation services on a travel site or rate quote services on an insurance site. Complex services or business processes • Enterprises can use a singular (discrete) service to accomplish a specific business task, such as billing or inventory control. • When enterprises need to compose several services together to create a business process such as customized ordering, customer support, procurement, and logistical support, they need to use complex Web services. • Complex (or composite) services typically involve the assembly and invocation of many pre- existing services possibly found in diverse enterprises to complete a multi-step business interaction. Distributed computing infrastructure A distributed system is characterized as a collection of (probably heterogeneous) networked computers, which communicate and coordinate their actions by passing messages. Distribution is transparent to the user so that the system appears as a single integrated facility. A distributed system has numerous operational components (computational elements, such as servers and other processors, or applications) which are distributed over various interconnected computer systems. Distributed systems usually use some kind of client–server organization. A computer system that hosts some component of a distributed system is referred to as a host. Distributed components are typically
  • 4. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 4 heterogeneous in that they are written in different programming languages and may operate under different operating systems and diverse hardware platforms. Internet protocols To enable data to be transmitted across the Internet typical distributed platforms, such as J2EE, rely on the support of Internet protocols. The most prominent of the Internet protocols is the Transport Control Protocol over Internet Protocol (or TCP/IP). The Internet Protocol (IP), the basic protocol of the Internet, enables the unreliable delivery of individual packets from one host to another. The Transport Control Protocol (TCP) adds the notions of connection and reliability. These two protocols provide for the reliable delivery of streams of data from one host to another across communication networks, and the Internet in particular. Open Systems Interconnection A reference model is a conceptual blueprint of how communications should take place. It addresses all the processes required for effective communication and divides these processes into logical groupings called layers. When a communication system is designed in this manner, it is known as layered architecture. The TCP/IP network protocol The TCP/IP stack is shown in Figure in association with the various layers of the ISO/OSI model. This figure shows that each level of the TCP/IP stack builds on the services provided by the layer below it.
  • 5. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 5 Middleware Middleware is connectivity software that is designed to help manage the complexity and heterogeneity inherent in distributed systems by building a bridge between different systems thereby enabling communication and transfer of data. Middleware could be defined as a layer of enabling software services that allow application elements to interoperate across network links, despite differences in underlying communications protocols, system architectures, operating systems, databases, and other application services. The role of middleware is to ease the task of designing, programming, and managing distributed applications by providing a simple, consistent, and integrated distributed programming environment. Essentially, middleware is a distributed software layer, or “platform,” that lives above the operating system and abstracts over the complexity and heterogeneity of the underlying distributed environment with its multitude of network technologies, machine architectures, operating systems, and programming languages. The figure shows that the middleware abstraction comprises two layers. The bottom layer is concerned with the characteristics of protocols for communicating between processes in a distributed system and how the data objects, e.g., a sales order, and data structures used in application programs can be translated into a suitable form for sending messages over a communications network, taking into account that different computers may rely on heterogeneous representations for simple data items. The layer above is concerned with interprocess communication mechanisms, while the layer above that is concerned with non-message- and message-based forms of middleware. Non-message-based forms of middleware provide synchronous communication mechanisms designed to support client–server communication. Message-based forms of middleware provide asynchronous messaging and event notification mechanisms to exchange messages or react to events over electronic networks.
  • 6. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 6 client–server model The client–server architecture is one of the common solutions to the conundrum of how to handle the need for both centralized data control and widespread data accessibility. Client–server involves client processes (service consumers) requesting service from server processes (service providers). Servers may in turn be clients of other servers. For instance, a Web server is often a client of a local file server (or database server) that manages the files (storage structures) in which Web pages are stored . Characteristics of interprocess communication Messaging Distributed systems and applications communicate by exchanging messages. Messaging is a technology that enables high-speed, asynchronous, program-to-program communication with reliable delivery. Programs communicate by sending packets of data called messages to each other. The concept of a message is a well-defined, data-driven text format – containing the business message and a network routing header – that can be sent between two or more applications. A message typically comprises three basic elements: a header, its properties, and a message payload or body.
  • 7. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 7 The message header is used by both the messaging system and the application developer to provide information about characteristics such as the destination of a message, the message type, the message expiration time, and so forth. The properties of a message contain a set of application-defined name/value pairs. The message body carries the actual “payload” of the message. The format of the message payload can vary across messaging implementations. Most common formats are plain text, a raw stream of bytes for holding any type of binary data, or a special XML message type that allows the message payload to be accessed using any number of common XML parsing technologies. Message passing between a pair of processes is supported by two message communication operations: send and receive, defined in terms of destinations and messages. Marshalling is the process of taking an object or any other form of structured data items and breaking it up so that it can be transmitted as a stream of bytes over a communications network in such a way that the original object or data structure can be reconstructed easily on the receiving end. Unmarshalling is the process of converting the assembled stream of bytes on arrival to produce an equivalent object or form of structured data at the destination point. Therefore, marshalling comprises the transformation of structured data items and primitive values into an agreed standard form of representation for transmission across the network. Java and XML use the terms serialization and deserialization to denote the process of marshalling and unsmarshalling Message destinations and sockets messages are sent to ports. Servers usually publicize their port numbers for use by clients and processes use multiple ports from which to receive messages. During interprocess communication messages are sent to (Internet address, local port) pairs. Many applications involve two processes in different hosts communicating with each other over a network. These two processes communicate with each other by exchanging (sending and receiving) messages. A process sends messages into, and receives messages from, the network through its socket. A process’s socket could be thought of as the entry point to the process. Interprocess communication consists of transmitting a message between a client and a socket in another process Once the message arrives at its destination, it passes through the receiving process’s socket and the receiving process then acts on the message.
  • 8. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 8 Synchronous and asynchronous forms of message communication These modes are: synchronous or time dependent and asynchronous or time independent. The defining characteristic of a synchronous form of execution is that message communication is synchronized between two communicating application systems, which must both be up and running, and that execution flow at the client’s side is interrupted to execute the call. Both the sending and the receiving application must be ready to communicate with each other at all times. When using asynchronous messaging, the caller employs a send and forget approach that allows it to continue to execute after it sends the message. With asynchronous communication, an application sends (requestor or sender) a request to another while it continues its own processing activities. The sending application does not have to wait for the receiving application to complete and for its reply to come back. Synchronous forms of middleware Programming models for synchronous forms of middleware are composed of cooperating programs running in several interacting distributed processes. Such programs need to be able to invoke operations synchronously in other processes, which frequently run in different computing systems. The most familiar approaches to non-message-based forms of middleware are typified by the remote procedure call (RPC) and the remote method invocation (RMI). Remote procedure calls RPC is a basic mechanism for interprogram communication. In effect, RPC is the middleware mechanism used to invoke a procedure that is located on a remote system, and the results are returned. By design, the RPC programming style mimics the serial thread of execution that a “normal” non- distributed application would use, where each statement is executed in sequence.
  • 9. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 9 The RPC mechanism is the simplest way to implement client–server applications because it keeps the details of network communications out of the application code. In RPC-style programming, an object and its methods are “remoted” such that the invocation of the method can happen across a network separation. In client application code, an RPC looks like a local procedure call, because it is actually a call to a local proxy known as a client stub (a surrogate code that supports RPCs). The client stub communicates with a server stub using the RPC runtime library, which is set of procedures that support all RPC applications. A server stub is like a skeleton method in that it unmarshals the arguments in the request message, calls the corresponding service procedure, and marshals the return results for the reply message. The server stub communicates its output to the client stub, again by using the RPC runtime library. Finally, the client stub returns to the client application code. Remote method invocation The Java RMI provides a simple and direct model for distributed computation with Java objects on the basis of the RPC mechanism. If the particular method happens to be on a remote machine, Java provides the capability to make the RMI appear to the programmer to be the same as if the method is on the local machine. RMI applications comprise two separate programs: a server and a client. RMI provides the mechanism by which the server and the client communicate and pass information back and forth.
  • 10. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 10 There are two different kinds of classes that can be used in RMI: remote and serializable classes. A remote object is an instance of a remote class. When a remote object is used in the same address space, it can be treated just like an ordinary object. But if it is used externally to the address space, the object must be referenced by an object handle. Asynchronous forms of middleware Asynchronous communication promotes a loosely coupled environment in which an application does not need to know the intimate details of how to reach and interface with other applications. Store and forward messaging With the store and forward queuing mechanism, messages are placed on a virtual channel called a message queue by a sending application and are retrieved by the receiving application as needed. Messages are exchanged through a queue, which is the destination to which senders send messages and a source from which receivers receive messages. The queue is a container that can keep hold of a message until the recipient collects it. The message queue is independent of both the sender and receiver applications and acts as a buffer between the communicating applications. Asynchronous communication with the store and forward queuing mechanism allows work to be performed whenever applications are ready. The message delivery semantics include several delivery options which range from exactly-once delivery to at-least-once delivery and to at-most-once delivery. The store and forward queuing mechanism is typical of a many-to-one messaging paradigm where multiple applications can send messages to a single application. The same application can be sender, receiver, or both sender and receiver. Message queuing provides a highly reliable, although not always timely, means of ensuring that application operations are completed. In many applications there is an additional requirement that the concept of store and forward is capable of being repeated across multiple message servers that are chained together.
  • 11. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 11 In this configuration, each message server uses the principle of store and forward and message acknowledgements to get the message to the next server in the chain of interconnected message servers. Publish/subscribe messaging This mode of messaging is a slightly more scalable form of messaging when compared to the store and forward mechanism. The publish/subscribe messaging works as follows. Suppose that a publisher application publishes messages on a specific topic, such as sending out new product prices or new product descriptions to retailers. Multiple subscribing applications can subscribe to this topic and receive the messages published by the publishing application. This figure describes how the publish/subscribe semantics work: 1. Publishers publish messages to specific topics. 2. A message server keeps track of all the messages, and all its currently active and durable subscribers (subscribers who specifically expressed a durable interest in the topic). The message server provides a secure environment for the messaging system by handling authorization and authentication. 3. As soon as messages are published on a specific topic, they are distributed to all of its subscribers. Durable subscribers, who were not connected at the time of message Event-driven processing mechanisms The familiar one-to-one request/reply interaction pattern that is commonly used in client–server systems is inadequate for systems that must react to events representing changes in the environment, information of interest, or process status, which are particularly well suited for distributed environments without central control. The asynchrony, heterogeneity, and inherent loose coupling that characterize modern applications in a wide area network promote event interaction as a natural design abstraction for a growing class of software systems. Such systems are based on a technical infrastructure known as an event notification service
  • 12. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 12 An event notification service complements other general-purpose middleware services, such as point- to-point and multicast communication mechanisms, by offering a manyto- many communication and integration facility. Clients in an event notification scheme are of two kinds: objects of interest, which are the producers of notifications, and interested parties, which are the consumers of notifications. Point-to-point queuing The point-to-point messaging model allows clients to send and receive messages both synchronously and asynchronously via queues. The point-to-point messaging model provides reliable communication for multi-staged applications. This model has traditionally been a pull-based or pollingbased model, where messages are requested from a queue instead of being pushed to the client automatically as is the case with publish/subscribe model. Request/reply messaging On many occasions applications require that request/reply messaging operations be performed. Here, we can distinguish between two types of request/reply messaging operations: synchronous request/reply messaging and asynchronous request/reply messaging operations. Synchronous request/reply messaging is often necessary when trying to integrate with a Web service client that blocks and waits for a synchronous response to return to it In the asynchronous version of request/reply messaging, the requestor (sender) expects the reply to arrive at a later time and continue its work unaffected. a simple request /reply asynchronous messaging configuration. Observe that in this figure message delivery channels are not bidirectional. To perform a request/reply operation the sender must use two channels: one for the request and one for the reply.
  • 13. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 13 Message-oriented middleware Message-oriented middleware (MOM) is an infrastructure that involves the passing of data between applications using a common communication channel that carries self-contained messages. In an MOM-based communication environment, messages are usually sent and received asynchronously. Using message-based communications, applications are abstractly decoupled as senders and receivers are not aware of each other. Instead they send and receive messages from the messaging system and it is the responsibility of the messaging system, namely the MOM, to forward the messages to their intended destination. MOM is interposed between the client and the server part of client–server architecture and handles asynchronous calls between clients and servers, To support this asynchronous model, MOM products typically use message queues to store calls temporarily and allow clients and servers to run at different times. Messages in the queue can consist of formatted data, requests for action, or both. The messaging system is responsible for managing the connection points between messaging clients, and for managing multiple channels of communication between the connection points. The messaging system is usually implemented by a software module known as the message (or integration) broker.
  • 14. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 14 Integration brokers Integration brokers perform necessary content and format transformation to translate incoming messages into a scheme that the destination system(s) can understand and utilize. Integration brokers are usually built on top of some MOM implementations and so the general principles of MOM also apply to them. Initially integration brokers were called message brokers but this name often led to a mischaracterization and confusion between message brokers and message-oriented middleware. More recently, message brokers have been renamed integration brokers, which is a more descriptive name for the features they provide. An integration broker is an application-to-application middleware service that is capable of one-to- many, many-to-one, and many-to-many message distribution. An integration broker is a software hub that records and manages the contracts between publishers and subscribers of messages. The Java Message Service (JMS) JMS is a vendor-agnostic API for enterprise messaging that can be used with many different MOM vendors. JMS acts as a wrapper around different messaging products, allowing developers to focus on actual application development and integration, rather on the particulars of each other’s APIs. Application developers use the same API to access many different systems. JMS is not a messaging system itself. It is an abstraction of the interfaces and classes needed by messaging clients when communicating with different messaging systems. JMS not only provides a Java API for connectivity to MOM systems, but also supports messaging as a first-class Java distributed computing paradigm on an equal footing with RPC A common application for JMS involves interfacing Enterprise Java Beans (EJBs) with legacy applications and sending legacy-related data between the two. The JMS messaging point-to-point model allows JMS clients to send and receive messages both asynchronously and synchronously via queues. JMS supports two types of message delivery: reliable message delivery and guaranteed message delivery. overview of XML XML is an extensible markup language used for the description and delivery of marked-up electronic text over the Web. Two important characteristics of XML distinguish it from other markup languages: its document type concept and its portability.
  • 15. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 15 An important aspect of XML is its notion of a document type. XML documents are regarded as having types. XML’s constituent parts and their structure formally define the type of a document. An XML document is composed of named containers and their contained data values. Typically, these containers are represented as declarations, elements, and attributes. A declaration declares the version of XML used to define the document. The technical term used in XML for a textual unit, viewed as a structural component, is element. An XML document is also known as an instance or XML document instance. This signifies the fact that an XML document instance represents one possible set of data for a particular markup language. The example in Listing typifies an XML document instance. This example shows billing information associated with a purchase order issued by plastics manufacturer. <?xml version="1.0" encoding="UTF-8"?> <BillingInformation> <Name> Right Plastic Products </Name> <BillingDate> 2002-09-15 </BillingDate> <Address> <Street> 158 Edward st. </Street> <City> Brisbane </City> <State> QLD </State> <PostalCode> 4000 </PostalCode> </Address> </BillingInformation> XML declaration The XML processing software uses the declaration to determine how to deal with the subsequent XML content. A typical XML declaration begins with a prologue that typically contains a declaration of conformity to version 1.0 of the XML standard and to the UTF-8 encoding standard: <?xml version="1.0" encoding="UTF-8"?>.
  • 16. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 16 Elements The topmost element of the XML document is a single element known as the root element. The content of an element can be character data, other nested elements, or a combination of both. Elements contained in other elements are referred to as nested elements. The containing element is the parent element and the nested element is called the child element. Attributes Another way of putting data into an XML document is by adding attributes to start tags. Attributes are used to better specify the content of an element on which they appear by adding information about a defined element. An attribute specification is a name–value pair that is associated with an element. Unlike elements, attributes cannot be nested. They must also always be declared in the start tag of an element. URIs and XML namespaces A Web architecture starts with a uniform syntax for resource identifiers, so that one can refer to resources, access them, describe them, and share them. The Uniform Resource Identifier (URI) is the basis for identifying resources in WWW. A URI consists of a string of characters that uniquely identifies a resource. The W3C uses the newer and broader term URI to describe network resources rather than the familiar but narrower term Uniform Resource Locator (URL).
  • 17. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 17 XML allows designers to choose the names of their own tags and as a consequence it is possible that name clashes (i.e., situations where the same tag name is used in different contexts) occur when two or more document designers choose the same tag names for their elements. XML namespaces provide a way to distinguish between elements that use the same local name but are in fact different, thus avoiding name clashes. A namespace declaration is indicated by a URI denoting the namespace name. The URI may be mapped to a prefix that may then be used in front of tag and attribute names, separated by a colon. In order to reference a namespace, an application developer needs to first declare one by creating a namespace declaration using the form An XML example using namespaces xmlns:<Namespace Prefix> = <someURI> <?xml version="1.0" encoding="UTF-8"?> <BillingInformation customer-type="manufacturer" xmlns="http://www.plastics_supply.com/BillInfo"> XML Schema An XML Schema describes the structure of an XML document. The XML Schema language is also referred to as XML Schema Definition (XSD). <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:string"/> <xs:element name="from" type="xs:string"/> <xs:element name="heading" type="xs:string"/> <xs:element name="body" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> Using XSLT to transform documents To perform document transformation, a document developer usually needs to supply a style sheet, which is written in XSLT. The style sheet specifies how the XML data will be displayed. XSLT uses the formatting instructions in the style sheet to perform the transformation. The converted document can be another XML document or a document in another format, such as HTML, that can be
  • 18. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 18 displayed on a browser. Formatting languages, such as XSLT, can access only the elements of a document that are defined by the document structure, e.g., XML schema. SOAP: Simple Object Access Protocol Web services rely on SOAP, an XML-based communication protocol for exchanging messages between computers regardless of their operating systems, programming environment, or object model framework. SOAP codifies the use of XML as an encoding scheme for request and response parameters using HTTP as a means for transport. In particular, a SOAP method is simply an HTTP request and response that complies with the SOAP encoding rules. A SOAP endpoint is simply an HTTP-based URL that identifies a target for method invocation. SOAP provides a wire protocol in that it specifies how service-related messages are structured when exchanged across the Internet. SOAP as a wire representation SOAP makes use of openly available technologies that, when combined, specify a wire protocol. SOAP commonly uses HTTP to transport XML-encoded serialized method argument data from system to system. This serialized argument data is used on the remote end to execute a client’s method call on that system, rather than on a local system. Wire protocols, such as SOAP, are designed to meet specific design criteria, including [Scribner 2002] compactness, protocol efficiency, coupling, scalability, and interoperability: • Compactness refers to how terse a network package becomes while conveying the same information. Small degree of compactness is usually best. • Protocol efficiency is directly related to compactness. Efficiency is rated by examining the overhead required to send the payload. The more overhead required, the less efficient the protocol is. • Coupling is the rate at which the client application needs to adapt to changes. Loosely coupled protocols are quite flexible and can easily adapt to changes, while tightly coupled protocols require significant modifications to both the server and existing clients. • Scalability addresses the ability of a protocol to work with a large number of potential recipients. Some protocols are limited to a few hundreds of clients, while others can easily handle millions. • Interoperability refers to the ability of the protocol to work with a variety of computing platforms. For instance, general-purpose protocols enable clients to send information to a variety of systems. SOAP as a messaging protocol
  • 19. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 19 The Web services communication and messaging network SOAP has a clear purpose: exchanging data over networks. Specifically, it concerns itself with encapsulating and encoding XML data and defining the rules for transmitting and receiving that data Structure of a SOAP message A SOAP message is an ordinary XML document containing the following elements − • Envelope − Defines the start and the end of the message. It is a mandatory element. • Header − Contains any optional attributes of the message used in processing the message, either at an intermediary point or at the ultimate end-point. It is an optional element. • Body − Contains the XML data comprising the message being sent. It is a mandatory element. • Fault − An optional Fault element that provides information about errors that occur while processing the message. <?xml version = "1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV = "http://www.w3.org/2001/12/soap-envelope" SOAP-ENV:encodingStyle = "http://www.w3.org/2001/12/soap-encoding"> <SOAP-ENV:Header> ... ... </SOAP-ENV:Header> <SOAP-ENV:Body> ... ... <SOAP-ENV:Fault> ... ... </SOAP-ENV:Fault> ... </SOAP-ENV:Body> </SOAP_ENV:Envelope>
  • 20. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 20 The SOAP communication model The Web services communication model describes how to invoke Web services and relies on SOAP. The SOAP communication model is defined by its communication style and its encoding style. SOAP supports two possible communication styles: 1. RPC and 2. document (or message). RPC-style Web service Document-style Web services Error handling in SOAP SOAP provides a model for handling situations when faults arise in the processing of a message. SOAP distinguishes between the conditions that result in a fault and the ability to signal that fault to the originator of the faulty message or another node. The SOAP <Body> element has another distinguishing role in that it is the place where fault information is placed. The SOAP fault model requires that all SOAP-specific and application-specific faults be reported using a special-purpose element called env:Fault. <env:Body>
  • 21. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 21 <env:Fault> <env:Code> <env:Value>env:Sender</env:Value> <env:Subcode> <env:Value> m:InvalidPurchaseOrder </env:Value> </env:Subcode> </env:Code> <env:Reason> <env:Text xml:lang="en-UK"> Specified product did not exist </env:Text> </env:Reason> <env:Detail> <err:myFaultDetails xmlns:err="http://www.plastics_supply.com/ faults"> <err:message> Product number contains invalid characters </err:message> <err:errorcode> 129 </err:errorcode> </err:myFaultDetails> </env:Detail> </env:Fault> </env:Body> SOAP over HTTP Quite logically, SOAP requests are sent via an HTTP request and SOAP responses are returned within the content of the HTTP response. While SOAP requests can be sent via an HTTP GET, the specification includes details on HTTP POST only. Additionally, both HTTP requests and responses are required to set their content type to text/xml. The SOAP specification mandates that the client must provide a SOAPAction header, but the actual value of the SOAPAction header is dependent on the SOAP server implementation. For example, to access the AltaVista BabelFish Translation service, hosted by XMethods, you must specify the following as a SOAPAction header. urn:xmethodsBabelFish#BabelFish Even if the server does not require a full SOAPAction header, the client must specify an empty string ("") or a null value. For example − SOAPAction: "" SOAPAction: Here is a sample request sent via HTTP to the XMethods Babelfish Translation service −
  • 22. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 22 POST /perl/soaplite.cgi HTTP/1.0 Host: services.xmethods.com Content-Type: text/xml; charset = utf-8 Content-Length: 538 SOAPAction: "urn:xmethodsBabelFish#BabelFish" <?xml version = '1.0' encoding = 'UTF-8'?> <SOAP-ENV:Envelope xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd = "http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <ns1:BabelFish xmlns:ns1 = "urn:xmethodsBabelFish" SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/"> <translationmode xsi:type = "xsd:string">en_fr</translationmode> <sourcedata xsi:type = "xsd:string">Hello, world!</sourcedata> </ns1:BabelFish> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Note the content type and the SOAPAction header. Also note that the BabelFish method requires two String parameters. The translation mode en_fr translates from English to French. Here is the response from XMethods HTTP/1.1 200 OK Date: Sat, 09 Jun 2001 15:01:55 GMT Server: Apache/1.3.14 (Unix) tomcat/1.0 PHP/4.0.1pl2 SOAPServer: SOAP::Lite/Perl/0.50 Cache-Control: s-maxage = 60, proxy-revalidate Content-Length: 539 Content-Type: text/xml <?xml version = "1.0" encoding = "UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENC = "http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance" xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd = "http://www.w3.org/1999/XMLSchema"> <SOAP-ENV:Body> <namesp1:BabelFishResponse xmlns:namesp1 = "urn:xmethodsBabelFish"> <return xsi:type = "xsd:string">Bonjour, monde!</return> </namesp1:BabelFishResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> SOAP responses delivered via HTTP are required to follow the same HTTP status codes. For example, a status code of 200 OK indicates a successful response. A status code of 500 Internal Server Error indicates that there is a server error and that the SOAP response includes a Fault element.
  • 23. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 23 Advantages and disadvantages of SOAP Simplicity: SOAP is simple as it based on XML, which is highly structured and easy to parse. Portability: SOAP is portable without any dependencies on the underlying platform like byte-ordering issues or machine-word widths. Today, XML parsers exist for virtually any platform from mainframes to write-watch-size devices. Firewall-friendly: Posting data over HTTP means not only that the delivery mechanism is widely available but also that SOAP is able to get past firewalls that pose problems for other methods. Use of open standards: SOAP uses the open standard of XML to format the data, which makes it easily extendable and well supported. Interoperability: SOAP is built on open, rather than vendor-specific, technologies and facilitates true distributed interoperability and loosely coupled applications. Because SOAP is a wire protocol based on XML and HTTP, it is possibly the most widely interoperable protocol to date and can be used to describe message exchanges between autonomous technical environments and highly diverse enterprise applications. Universal acceptance: SOAP is the most widely accepted standard in the message communication domain. Resilience to changes: Changes to the SOAP infrastructure will likely not affect applications using the protocol, unless significant serialization changes are made to the SOAP specification. Building Web Services with JAX-WS Java API for XML Web Services (JAX-WS) is a technology for building web services and clients that communicate using XML. JAX-WS allows developers to write message-oriented as well as Remote Procedure Call-oriented (RPC-oriented) web services. In JAX-WS, a web service operation invocation is represented by an XML-based protocol, such as SOAP. The SOAP specification defines the envelope structure, encoding rules, and conventions for representing web service invocations and responses. These calls and responses are transmitted as SOAP messages (XML files) over HTTP. Although SOAP messages are complex, the JAX-WS API hides this complexity from the application developer. On the server side, the developer specifies the web service operations by defining methods in an interface written in the Java programming language. The developer also codes one or more classes that implement those methods. Client programs are also easy to code. A client creates a proxy (a local object representing the service) and then simply invokes methods on the proxy. With JAX-WS, the developer does not generate or parse SOAP messages. It is the JAX-WS runtime system that converts the API calls and responses to and from SOAP messages. With JAX-WS, clients and web services have a big advantage: the platform independence of the Java programming language Communication between a JAX-WS Web Service and a Client
  • 24. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 24 The starting point for developing a JAX-WS web service is a Java class annotated with the javax.jws.WebService annotation. The @WebService annotation defines the class as a web service endpoint. The basic steps for creating a web service and client are as follows: 1. Code the implementation class. 2. Compile the implementation class. 3. Package the files into a WAR file. 4. Deploy the WAR file. The web service artifacts, which are used to communicate with clients, are generated by the GlassFish Server during deployment. 5. Code the client class. 6. Use a wsimport Ant task to generate and compile the web service artifacts needed to connect to the service. 7. Compile the client class. 8. Run the client. CREATING AND USING WEBSERVICES 1. new project 2. choose java web-->web application 3. give name to project (myfirstwebservice) 4. select server (glassfish or tomcat) 5. click finish 6. right click on project-->new-->web service 7. give name to webservice (sidwebservice) and package (weit.org) "here webservice will have hello sample method by default" 8. now right click on project and deploy 9. now in project you will able to see web services folder (inside you will able to see sidwebservice) right click and test websevice 10. now in browser you will able to see wsdl file output with hello button and textbox(copy the wsdl url) 11. our webservice server is ready dont stop deployment keep it running 12. now we have to create a client or subscriber to consume server 13. preparing client 14. new project 15. choose java web-->web application 16. give name to project (retrivingwebservice) 17. select server (glassfish or tomcat) 18. click finish 19. now right click on project-->new-->webserviceclient 20. now in wsdl url paste (copy the wsdl url) 21. now in web pages create a jsp file (right click on web pages-->add-->jsp) 22. new drag and drop webservice from (web service references) to jsp page
  • 25. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 25 23. now pass a parameter to webservice and print the result as given above 24. now right click on jsp page and run the page. 25. now on browser you will able to see the output which is returned from web service. Registering and Discovering Web Services webref: https://pdfs.semanticscholar.org/presentation/b6e3/41c606a9b155054ac67cb6a16510720797f6.pdf Service registries To exploit the full potential of e-business, organizations must be able to discover each other, make their needs and capabilities known, and compose Web services from diverse organizations into new services and business processes. This solution requires the creation of a service registry architecture that enables enterprises to introduce a global, platform-independent, open framework for businesses to (i) discover each other, (ii) define how they interact over the Internet, and (iii) share information in a global registry that will more rapidly accelerate the global adoption of e- business. Service registries are all about visibility and control. At the simplest level, a service registry keeps track of what services an organization has and characteristics of those services. two types of e-business registries can be discerned document-based A document-based service registry enables its clients to publish information by storing XML-based service documents, such as business profiles or technical specifications (including WSDL descriptions of the service), in the registry. metadata-based
  • 26. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 26 Metadata is stored in the service registry and is used by the registry to provide meaningful attachments to its descriptive documents, which are made persistent in the storage facility of the service registry. advanced registry offers several appealing characteristics • Maximizes Web services reuse and encourages broad usage by all potential users in an SOA solution. • Creates a management and governance structure to grow and sustain a successful SOA implementation. • Contains all the metadata about Web services and their associated objects. It also contains information about service providers, consumers, and their relationships. • Provides general- and special-purpose interfaces that address the needs of providers, consumers, administrators, and operators. • Ensures that the evolving SOA can handle the growing number of services and service consumers and quickly adapt to changing business requirements. Service discovery Service discovery is an important element of an SOA(service-oriented architecture) Service discovery is the process of locating Web service providers, and retrieving Web service descriptions that have been previously published. two basic types of service discovery static Static service discovery generally occurs at design time dynamic dynamic discovery occurs at run-time UDDI Universal Description, Discovery, and Integration To address the challenges of service registration and discovery, the Universal Description, Discovery, and Integration specification was created. UDDI is a cross-industry initiative to create a registry standard for Web service description and discovery together with a registry facility that supports the publishing and discovery processes. UDDI enables a business to • describe its business and its services • discover other businesses that offer desired services • integrate (interoperate) with these other businesses. The UDDI specifications take advantage of World Wide Web Consortium (W3C) and Internet Engineering Task Force (IETF) standards such as XML, HTTP, and Domain Name System (DNS) protocols.
  • 27. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 27 UDDI is designed for use by developer tools and applications that use Web services standards such as SOAP/XML and WSDL. UDDI provides a global, platform-independent, open framework. UDDI is a registry that contains relatively lightweight data. As a registry its prime purpose is to provide network addresses to the resources it describes. The core concept of the UDDI initiative is the UDDI business registration, an XML document used to describe a business entity and its Web services. Conceptually, the information provided in a UDDI business registration consists of three interrelated components • “white pages”, including address, contact, and other key points of contact. • “yellow pages” , the classification of information according to industrial classifications based on standard industry taxonomies • “green pages”, the technical capabilities and information about services that are exposed by the business including references to specifications for Web services and pointers to various file- and URL-based discovery mechanisms. The information that is stored in the UDDI registry allows applications and developers to determine who the business entity represents, what they do, where the services they provide can be found, and how they can be accessed. UDDI data structures For Web services to be meaningful there is a need to provide information about them beyond the technical specifications of the service itself. UDDI – main characteristics UDDI provides a mechanism to categorize businesses and services using taxonomies. • Service providers can use a taxonomy to indicate that a service implements a specific domain standard, or that it provides services to a specific geographic area • UDDI uses standard taxonomies so that information can be discovered on the basis of categorization. UDDI business registration • an XML document used to describe a business entity and its Web services UDDI usage model An enterprise may set up multiple private UDDI registries in-house to support intranet and eBusiness operations. Public UDDI registries can be set up by customers and business partners of an enterprise. Services must be published in a public UDDI registry so that potential clients and service developers can discover them.
  • 28. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 28 Queries address the following • Find Web services implementations that are based on a common abstract interface definition. • Find Web service providers that are classified according to a known classification scheme or identifier system. • Issue a search for services based on a general keyword. • Determine the security and transport protocols supported by a given Web service. • Cache the technical information about a Web service and then update that information at run- time. Overview of UDDI data structures The UDDI XML schema defines four core types of information that provide the white/yellow/green page functions.
  • 29. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 29 These are: business entities, business services, binding templates; and information about specifications for services (technical or tModels) The UDDI XML schema specifies information about the business entity, e.g., a company, that offers the service (<businessEntity>), describes the services exposed by the business (<businessService>), and captures the binding information (<bindingTemplate>) required to use the service. Service provider information Partners and potential clients of an enterprise’s services that need to be able to locate information about the services provided would normally have as a starting point a small set of facts about the service provider. The business entity element and business key attribute. The core XML elements for supporting publishing and discovering information about a business – the UDDI Business Registration – are contained in an element named <businessEntity>. The discovery URLs element. This is an optional element and contains the URLs that point to alternate Web addressable (via HTTP GET) discovery documents. The name element. The name element contains the common name of the organization that a business entity represents. A <businessEntity> may contain more than one name. The description element. This element is a short narrative description for the business. A <businessEntity> can contain several descriptions, e.g., in different languages. The contacts element. This element is an optional list of contact information for the organization The business services element. This is an optional list containing information describing logical families of the business services that this business entity provides. The identifier bag element. In addition to the descriptive information the UDDI registry provides information about enterprises and their services The category bag element. A <categoryBag> element is similar to the <identifierBag>. This element is a list of one or more <keyedReference> structures that tag the business entity with specific classification information, e.g., industry, product, or geographic codes. Example – Business entity <businessEntity businessKey="d2300-3aff-.." xmlns = “urn:uddi-org:api_v2”> <name xml: lang="en"> Automotive Equipment Manufacturing Inc. </name> <description xml: lang="en"> Automotive Equipment, Accessories and Supplies for European firms </description> <contacts> <contact useType="Sales Contact">
  • 30. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 30 <description xml: lang="en"> Sales Representative </ description> <personName> Reginald Murphy </personName> <email useType="primary"> joe.murphy@automeq.com </email> <address useType="http"> <addressLine> http://www.medeq.com/sales/ </addressLine> </address> </contact> </contacts> <businessServices> <!-- Business service information goes here --> </businessServices> <identifierBag> <!-- DUNS Number identifier System --> <keyedReference keyName="DUNS Number" keyValue="…" tModelKey="…"/> </identifierBag> <categoryBag> <!—North American Industry Classification System (NAICS) --> <keyedReference keyName="Automotive parts distribution" keyValue="…" tModelKey="…"/> …… </categoryBag> </businessEntity> Business service The services provided by a business entity are described in business terms using businessService elements. A businessEntity can have several businessServices but a businessService belongs to one businessEntity. A businessService contains: • a serviceKey that uniquely identifies the service and the businessEntity (not necessarily the same as where the businessService is found) • name: as before • description: as before • categoryBag: as before • bindingTemplates: a list to all the bindingTemplates for the service with the technical information on how to access and use the service.
  • 31. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 31 example : business service <businessServices> <businessService serviceKey=" "> <name> Search the Automotive Equipment Manufacturing parts Registry </name> <description lang="en"> Get to the Automotive Equipment Manufacturing parts Registry </description> <bindingTemplates> <bindingTemplate bindingKey=".."> <description lang="en"> Use your Web Browser to search the parts registry </description> <accessPoint URLType="http"> http://www.automeq.com/b2b/actions/search.jsp </accessPoint> <tModelInstanceDetails> <tModelInstanceInfo tModelKey=”uddi:..”/> <tModelInstanceDetails> </bindingTemplate> </bindingTemplates> </businessService> </businessServices> Binding template: “green pages” A binding template contains the technical information associated to a particular service: • bindingKey • serviceKey • description • accessPoint: the network address of the service being provided • tModels: a list of entries corresponding to tModels associated with this particular binding • categoryBag: additional information about the service and its binding (e.g., whether it is a test binding, it is on production, etc). example bindingtemplate
  • 32. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 32 <bindingTemplate bindingKey=".."> <description lang="en"> Use your Web Browser to search the parts registry </description> <accessPoint URLType="http"> http://www.automeq.com/b2b/actions/search.jsp </accessPoint> <tModelInstanceDetails> <tModelInstanceInfo tModelKey=”uddi:..”/> <tModelInstanceDetails> </bindingTemplate> tModel A tModel is a generic container of information which contains technical information associated with the use of a Web service: • the actual interface and protocol used, including a pointer to the WSDL description; • description of the business protocol and conversations supported by the service. example tmodel <tModel tModelKey="…" > <name> RosettaNet-Org </name> <description xml:lang="en"> Supports a process for trading partners to request and provides quotes </description > <overviewDoc> <description xml:lang="en"> This compressed file contains the specification in a word document, the html guidelines document, and the XML schemas. </ description> <overviewURL> http://www.rosettanet.org/rosettanet/Doc/0/ K96RPDQA97A1311M0304UQ4J39/3A1_RequestQuote.zip </overviewURL> </overviewDoc> <categoryBag> <keyedReference keyName="Trading quote request and provision" keyValue="80101704" tModelKey=" ….."/> </categoryBag> </tModel> The publisher assertion structure
  • 33. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 33 A <publisherAssertion> structure defines relationships between pairs of <businessEntity> structures. Two (or more) related enterprises may use the <publisherAssertion> structure to publish assertions of business relationships, which are mutually acceptable to both parties example of publisherAssertion <publisherAssertion> <fromKey> FE565 … <fromKey> <toKey> A237B … <toKey> <keyedReference tModelKey="uuid:807A .. " /> keyName="subsidiary" keyValue="parent-child"> </ keyedReference > </publisherAssertion> WSDL to UDDI mapping model The service desc. in WSDL documents is complementary to the information found in UDDI business/service entries. These two constructs work together naturally. • UDDI and WSDL distinguish clearly between interface and implementation. • By decoupling a WSDL specification and registering it in UDDI, we can populate UDDI with standard interfaces that have multiple implementations, providing a landscape of business applications that share interfaces.
  • 34. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 34 Mapping WSDL to UDDI The UDDI API A UDDI registry offers a standard mechanism to classify, catalogue, and manage Web services, so that they can be discovered and consumed. The UDDI API is an interface that accepts XML messages wrapped in SOAP envelopes • UDDI provides application program interfaces (APIs) for access to a UDDI system: • UDDI inquiry: to locate and find details about entries in a UDDI registry. Supports a number of patterns (browsing, drill-down). • UDDI publication: to publish and modify information in a UDDI registry. • UDDI security: for access control to the UDDI registry (token based). • UDDI subscription: for clients to subscribe to changes of information in the UDDI registry. • UDDI replication: to perform replication of information across nodes in a UDDI registry. • UDDI custody and ownership transfer: to change the owner (publisher) of information. All UDDI interactions use a request/response model, in which each message requesting a service from a UDDI registry generates some kind of response. The UDDI specifications allow two types of exchanges with UDDI-registered sites: enquiries and publishing. • The enquiry API is used to search and read data in a UDDI registry, while the • publishing API is used to add, update, and delete data in a UDDI registry. Enquiry API
  • 35. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 35 Requestors can obtain information from a UDDI registry using its enquiry interface. Enquiries enable trading organizations to find businesses, services, or technical characteristics meeting certain criteria. • Browse functions search the registry based on keywords and return summary lists with overview information (key, name, and description) about matching businesses or services. • Find qualifiers are used to sort the results and to control the keyword matching. o To minimize the number of requests, find queries can be nested. • Drill-down functions fetch the specific UDDI data structures about particular entries given their key, returned by the Browse functions. Publishing API o The publishing interface can be used by clients to store and update information contained in a UDDI registry. o The registry performs access control for all publishing functions: information about the entries can only be edited by the owner. o Category information and keyed references associated with the entries are validated before accepting new information into the registry. o Save operations allow a client to add or update information in the UDDI. Querying the UDDI model The sample queries described in this section are based on the enquiry API and can be issued at design/build time or at run-time, depending on the type of application being developed. o Finding business entities by name. o Finding <businessEntity> entries by category. o Finding the <tModel> for <portType> name. o Find all <binding tModel> for PurchaseOrderPortType.
  • 36. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 36 UDDI usage model and deployment variants Business information provider roles Registry operators: o organizations (operator nodes) that host and operate the UDDI business registry (UBR). o These manage and maintain the directory information, cater for replication of business info. and other directory-related functions. o The registry works on a “register once, published everywhere” principle. Standard bodies and industry consortia: • these publish descriptions in the form of service type definitions (s). o These s do not contain the actual service definitions, instead they have a URL that points to the location where the service descriptions (usually in WSDL) are stored. Service providers: • commonly implement Web services conforming to service type definitions supported by UDDI. o They publish information about their business and services in the UDDI. o The published data also contains the end point of Web services UDDI deployment possibilities o e-marketplace UDDI: an e-marketplace, a standards body, or a consortium of organizations that participate and compete in the industry can host this private UDDI node o Business partner UDDI registry: a private UDDI node hosted behind one of the business partner’s firewall and only trusted or vetted partners can access the registry o Portal UDDI: this type of deployment is on an enterprise’s firewall and is a private UDDI node that contains only meta-data related to the enterprise’s Web services. o Internal UDDI: this allows applications in different departments of the organization to publish and find services, and is useful for large organizations. Service-oriented architectures The challenges in automated business integration have fueled new approaches and architectures to address the requirements of loosely coupled, standards-based, and protocol-independent distributed computing applications culminating in the introduction of the service-oriented architecture. What is a software architecture Building distributed software systems involves fitting together resources and systems from diverse organizations as well as developing implementation code Software architecture of a computing system involves the description of the structures from which systems are built (software components), the externally visible properties of those components, their interrelationships as well as principles and guidelines governing their design and evolution over time.
  • 37. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 37 software architecture is the high-level structure of a software system –including distributed and service- oriented systems – that is commonly specified in terms of functional components and interactions/interconnections among those components. Components are identified and assigned responsibilities that client components interact with through “contracted” interfaces. Important properties of software architecture include o It is at a high-enough level of abstraction that the system can be viewed as a whole and yet it must provide enough information to form a basis for analysis, decision making, and hence risk reduction o The structure must support the functionality required of the system. Thus, the dynamic behavior of the system must be taken into account when designing the architecture. o It must conform to the system qualities (captured in SLAs or non-functional requirements). These likely include performance, security, interoperability, and reliability System quality attributes While the design of software systems concentrates on satisfying the functional requirements for a system, the design of the software architecture for systems concentrates on the non-functional or quality requirements of systems. Quality requirements of systems are described in terms of quality attributes, which are those system properties over and above the functionality of the system that determine the technical qualities of the system. There are two types of quality attributes o Run-time qualities provide value to the user and have more to do with short-term competitive differentiation o Development-time qualities, for the most part, provide business value (as opposed to direct value to the end user) and have to do with the long-term competitiveness of the business. Common architectural concerns • Meta-architecture: This is a set of architectural vision, style, principles, key communication and control mechanisms, and concepts that results in high-level decisions that will strongly influence the integrity and structure of the system. • Architectural patterns: Over time, software developers distinguish patterns in the way that systems are structured, and as these patterns become widespread they become dominant designs. Patterns allow the architect to start with a problem and a vision for the solution, and then find a pattern that fits that vision. • Architectural views: Software architectures are best envisioned in terms of a number of complementary views or models. • System decomposition principles and good interface design: These identify the high-level components of the system and the relationships among them. Their purpose is to direct attention at an appropriate decomposition of the system without delving into unnecessary details.
  • 38. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 38 • Key architectural design principles: These include abstraction, separation of concerns, postponing decisions, and simplicity, and related techniques such as interface hiding and encapsulation. SOA revisited SOA is a meta-architectural style that supports loosely coupled services to enable business flexibility in an interoperable, technologyagnostic manner. In SOA, business-aligned services are used as the basis for constructing flexible and dynamically reconfigurable end-to-end business processes. SOA is focused on creating a design style, technology, and process framework that will allow enterprises to develop, interconnect, and maintain enterprise applications and services efficiently and cost- effectively. Services in an SOA exhibit the following characteristics • All functions in an SOA are defined as services • All services are independent of each other • Service interfaces are invokable SOA’s loose-coupling principles • guide planning, • development, • integration, and • management of their network application Service roles in an SOA SOAs and Web services solutions include two well-known key roles: • a service requestor (client) and o Service Consumers make a request for a service in the SOA registry. Universal Description, Discovery and Integration (UDDI) standard is used for locating a service in the registry. • service provider • Service Producers register their service in the SOA registry. Web Services Description Language (WSDL) is used to describe a service. Reliable messaging Unfortunately, the core SOAP specification does not provide reliability mechanisms addressing such complex message routing requirements. Therefore, there is a clear need for more robust SOAP-based messaging specifications to guarantee that messages are being received by their intended recipients and that message addressing remains consistent despite the fact that messages might be routed to Web services implemented on different platforms Definition and scope of reliable messaging Reliability at the level of messages is often referred to as reliable messaging When specifying reliable messaging features there are three aspects that must be addressed equally
  • 39. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 39 • both the sender and recipient of a message know whether or not a message was actually sent and received, and that the message received is the same as the one sent. • we need to make sure that the message was sent once and only once to the intended recipient • we need to guarantee that the received messages are in the same order as they were sent WS-ReliableMessaging WS-ReliableMessaging provides a protocol for ensuring that unreceived and duplicate SOAP messages can be detected and received messages can be processed in the order in which they were sent. The WS-ReliableMessaging protocol depends upon other Web services specifications for the identification of service endpoint addresses and policies. The WS-ReliableMessaging standard has been developed to provide a framework for interoperability between different reliable transport infrastructures WS-ReliableMessaging protocol determines invariants maintained by the reliable messaging endpoints and the directives used to track and manage the delivery of a sequence of messages. WS-ReliableMessaging provides an interoperable protocol that a reliable messaging source and reliable messaging destination use to provide the application source and the application destination with a guarantee that a message that is sent will be delivered. WS-ReliableMessaging distinguishes two important traits: 1. The reliability protocol between message handlers(sequence is maintained) 2. The reliability QoS contract(assured delivery) There are four basic delivery assurances that endpoints provide and are supported by WS- ReliableMessaging • AtLeastOnce Delivery: This feature guarantees that every message sent will be delivered or an error will be raised on at least one endpoint. Some messages may be delivered more than once. • AtMostOnce Delivery: This feature guarantees that every message will be delivered at most once without duplication or an error will be raised on at least one endpoint. It is possible that some messages in a sequence may not be delivered. • ExactlyOnce Delivery: This feature guarantees that every message sent will be delivered without duplication or an error will be raised on at least one endpoint. This delivery assurance is the logical AND of the two prior delivery assurances. • InOrder Delivery: This feature enforces the delivery of a sequence of messages at the destination, in the same order as the submission order by the sending application. This delivery assurance says nothing about duplications or omissions. Structure of WS-ReliableMessaging • Sequences: The protocol uses the <Sequence> element to identify and track a group of messages • Message numbers: This numbering scheme makes it simple to detect missing or duplicate messages, and simplifies acknowledgement generation and processing.
  • 40. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 40 • Acknowledgements: An acknowledgement is an indication that a message was successfully transferred to its destination. Enterprise Service Bus The Enterprise Service Bus is an open standards-based message backbone designed to enable the implementation, deployment, and management of SOA-based solutions with a focus on assembling, deploying, and managing distributed service-oriented architectures. An ESB is a set of infrastructure capabilities implemented by middleware technology that enable an SOA and alleviate disparity problems between applications running on heterogeneous platforms and using diverse data formats. The ESB supports service invocations, message, and event-based interactions with appropriate service levels and manageability. ESB distributed processing infrastructure is aware of applications and services and uses content-based routing facilities to make informed decisions about how to communicate with them. ESB connecting diverse applications and technologies To successfully build and deploy a distributed SOA, there are five design/deployment and management aspects that need to be addressed first: • Service analysis and design: A service development methodology should be used to enable service-oriented development and the reuse of existing applications and resources. • Service enablement: The service development methodology should determine which discrete application elements need to be exposed as services. • Service orchestration: Distributed services need to be configured and orchestrated in a unified and clearly defined distributed process.
  • 41. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 41 • Service deployment: Emphasis should also be placed on the production environment that addresses security, reliability, and scalability concerns. • Service management: Services must be audited, maintained, and reconfigured and corresponding changes in processes must be made without rewriting the services or underlying application. Key capabilities of an ESB Dynamic connectivity capabilities: Dynamic connectivity is the ability to connect to Web services dynamically without using a separate static API or proxy for each service. Reliable messaging capabilities: Reliable messaging can be primarily used to ensure guaranteed delivery of these messages to their destination and for handling events. Topic- and content-based routing capabilities: The ESB should be equipped with routing mechanisms to facilitate not only topic-based routing, but also more sophisticated content-based routing. Transformation capabilities: A critical ability of the ESB is the ability to route service interactions through a variety of transport protocols, and to transform from one protocol to another where necessary. Service enablement capabilities: Service enablement includes the ability to access already existing resources such as legacy systems Security capabilities: Generically handling and enforcing security is a key success factor for ESB implementations. The ESB needs both to provide a security model to service consumers and to integrate with the (potentially varied) security models of service providers. Integration capabilities: To support SOA in a heterogeneous environment, the ESB needs to integrate with a variety of systems that do not directly support service-style interactions. ESB integration styles Integration at the presentation tier. Integration at the presentation tier is concerned with how the complete set of applications and services a given user accesses. ESB can provide one face to the users resulting in consistent user experience, with unified information delivery while allowing underlying applications to remain distributed. Application connectivity. Application connectivity is an integration style concerned with all types of connectivity that the ESB integration layer must support. Application connectivity has to deal with the following types of integration: 1. Application integration: Application integration is concerned with building and evolving an integration backbone capability that enables fast assembly and disassembly of various platform and component technologies. 2. Business process integration: Process integration is concerned with the development of automated processes that map to and provide solutions for business processes, integration of existing applications into processes, and integrating processes with other processes. 3. Business data integration: Data integration is the process of providing consistent access to business data in the enterprise, by all the applications that require it, in whatever form they need it, without being restricted by the format, source, or location of the data.
  • 42. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 42 4. Integration design and development methodology: One of the requirements for the application development environment must be that it takes into account all the styles and levels of integration that could be implemented within the enterprise, and provides for their development and deployment. Integration brokers To integrate disparate business applications one must concentrate on the characteristics and functions of integration brokers. Application servers Another critical middleware infrastructure used in connection with ESBs is application servers. Application servers offer an integrated development environment for developing and deploying distributed Web- and non-Web-based applications and services. Application servers typically provide Web connectivity for extending existing solutions and bring transaction processing mechanisms to the Web.
  • 43. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 43 Connectivity and translation infrastructure There are three alternative ways an application can exchange information with the ESB include • Application-provided Web services interface: Some applications and legacy application servers have adopted the open standards philosophy and have included a Web services interface. • Service wrapper as interface to adapter: In some cases the adapter may not supply the correct protocol (JMS, for example) that the ESB expects. In this case, the adapter would be Web services enabled. Leveraging legacy assets Legacy applications are critical assets of any modern enterprise as they provide access to mission-critical business information and functionality and thus control the majority of an organization’s business processes. The primary focus of legacy re-engineering and transformation is enterprises, business processes, the EAI, and how a legacy system can contribute to implementing the architecture without propagating the weaknesses of past designs and development methods. most fundamental form the process of re-engineering includes three basic tenets • understanding of an existing application, resulting in one or more logical descriptions of the application • restructuring or transformation of those logical descriptions into new, improved logical descriptions; • development of the new application based on these improved logical descriptions
  • 44. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 44 Scalability issues in an ESB For example, parallel execution of business operations and itinerary-based routing significantly contribute to the highly distributed nature of the ESB, as there is no centralized rules engine to refer back to for each step in the process. The use of asynchronous communications, message itineraries, message and process definitions allow different parts of the ESB to operate independently of one another. This results in a decentralized model providing complete flexibility in scaling any aspect of the integration network. Such a decentralized architecture enables independent scalability of individual services as well as the communications infrastructure itself. Integration patterns using an ESB integration service can manage stateful information about a business process that spans a considerable length of time. For example, a step in the business process may require human interaction, such as approval of a purchase order or of a new supplier. A business process integration pattern is the preferred solution for most ESB applications because it offers many advantages. Its single drawback is dealing with sometimes excess process complexity. The extended SOA Extended SOA consists of two SOA implementations: internal and external. Extended SOA implementation, can recognize the following services • Foreign Services o They represent services served by other systems of the external SOA. These services communicate with the middleware only and they are out of scope of our implementation. • Middleware o It acts as a service consumer part of external SOA implementation. The middleware is responsible for communication between all foreign services and our External Application Services and it is out of scope of our implementation. • External Application Services o They act as service providers for the middleware and as service consumers for Internal Application Services. These services combine and connect both SOA implementations.
  • 45. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 45 • Internal Application Services o They serve core functionality of the application acting as service providers for External Application Services and as service consumers for Basic Application Services. • Basic Application Services o They serve basic functionality of the application simplifying the build process of Internal Application Services (Add, Update, Delete, etc.). They act as service providers for Internal Application Services. Web services development lifecycle System development lifecycle System development lifecycle (SDLC) is the overall process of designing and developing software systems through a multi-step process from investigation of initial requirements through analysis, design, implementation, and maintenance. The simplest rendition of system development projects is the “waterfall” methodology. This methodology usually has five identifiable phases: analysis, design, implementation, testing, and maintenance. A more recent software development process is the rational unified process (RUP) whose aim is to support the analysis and design of iterative software development. Architecture of RUP Basic SOA model is divided into six major layers of abstraction: domains, business processes, business services, infrastructure services, service realizations, and operational systems.
  • 46. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 46 Service-oriented design and development milestones • Reusing existing functionality: Service-oriented solutions target reuse of existing functionality and assets such as prepackaged application suites, specialpurpose built components, commercial off-the-shelf (COTS) applications or legacy applications, within new applications and policy-based computing. • Minimizing costs of disruption: The adoption of specific “integration logic” functionality that enables orchestration of existing, working technology in the form of services results in minimizing the costs associated. • Employing an incremental mode of integration: One of the key benefits of the serviceoriented approach is that integration can be delivered on a gradual, requirements driven basis, but yet still amount to a cohesive whole in the long term. • Providing increased flexibility: Service-oriented solutions provide the ability to quickly and easily evolve and adapt applications in order to meet changing business requirements and new technologies. • Providing scalability: making it potentially possible to process large applications more quickly by spreading the load of processing across many servers. Quality of service-oriented design and development Service coupling One way of measuring service design quality is coupling, or the degree of interdependence between two business processes. The objective is to minimize coupling: that is, to make (self-contained) business processes as independent as possible by not having any knowledge of or relying on any other business processes.
  • 47. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 47 Coupling can be achieved by reducing the number of connections between services in a business process, eliminating unnecessary relationships between them, and by reducing the number of necessary relationships – if possible. coupling partitioned along the following dimensions: • Representational coupling: Business processes should not depend on specific representational or implementation details ,Representational coupling is useful for supporting. o Interchangeable/replaceable services : Existing services may be swapped with new service implementations o Multiple service versions : Different versions of a service may work best in parts of a business processes depending on the application’s needs. • Identity coupling: Connection channels between services should be unaware of who is providing the service. • Communication protocol coupling: A sender of a message should rely only on those effects necessary to achieve effective communication. Service cohesion Cohesion is the degree of the strength of functional relatedness of operations within a service. • Functional service cohesion: A functionally cohesive business process should perform one and only one problem-related task and contain only services necessary for that purpose. • Communicational service cohesion: A communicationally cohesive business process is one whose activities and services use the same input and output messages. • Logical service cohesion: tasks of the same general category by performing a set of independent but logically similar functions Service granularity Service granularity refers to the scope of functionality exposed by a service. Services may exhibit different levels of granularity. Functionality associated with the chosen business entity belongs within the service's functional boundary. The larger the quantity of related functionality, the coarser the service granularity. Conversely, services with more narrow or targeted functional contexts will tend to have a finer grained level of service granularity. level of service granularity is set by the service's functional context, not by the actual amount of functionality that resides within the physically implemented service. Overview of Web services development lifecycle
  • 48. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 48 Phases of the service-oriented design and development methodology planning phase The planning phase constitutes a preparatory phase that serves to streamline and organize consequent phases in the methodology. During this phase, the project feasibility, goals, rules, and procedures are set and requirements are gathered. analysis phase reviewing the business goals and objectives of an enterprise that drive the development of business processes. • “As-is” process model analysis “as-is” process model to allow the various stakeholders to understand the portfolio of available applications and business processes. o Portfolio analysis: assigning candidates and prioritized according to their technical quality and business value. o Cost estimation: estimate the cost of the re-engineering project o Cost–benefit analysis: cost of re-engineering is compared to the expected maintenance cost savings and value increases • Business service identification o Understanding how a business process works and how component functionality differs or can get adjusted between applications is an important milestone when trying to identify suitable business process candidates. • Business service scoping o Defining the scope of business processes helps ensure that a process does not become monolithic and mimic an entire application. • Business service gap analysis
  • 49. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 49 o A gap analysis strategy may be developed in stages and results in a recommendation to do development work, reuse, or purchase Web services. • Business service realization analysis o describes at a high level how a Web service usage interface could be connected to a portfolio of existing services and service-enabled applications which are assembled to form service orchestration specification interfaces. The service design phase This phase is logically succeeded by service design, during which conceptual processes and services are transformed from abstract entities into a set of concrete service interfaces. Service design concerns concerns include managing service granularity, designing for service reuse, and designing for service composability. • Managing service and component granularity Services analysis provides an initial granularity assessment based on the top-down logical analysis of services functionality and scope, which can be used as a starting point for designing concrete service interfaces. • Designing for service reusability designing services it is important to be able to design them for reuse so that they can perform a given function wherever this function is required within an enterprise • Designing for service composability principles that guarantee that services are self-contained, modular, and support service composability Specifying services • A structural specification: This focuses on defining the service types, messages, port types, and operations. • A behavioral specification: This entails understanding the effects and side effects of service operations and the semantics of input and output messages. • A policy specification: In addition to service syntax and semantics, QoS considerations must also be addressed. Specifying business processes Describing the business process structure The business process structure refers to the logical flow or progression of a business process process encompasses the following tasks: 1. Identify, group, and describe the activities and services that together implement a business process 2. Describe activity dependencies, conditions, or synchronization 3. Describe the implementation of the business process Describing business roles identify responsibilities associated with business process activities and the roles that are responsible for performing them Specifying service policies
  • 50. TYBSC-CS SEM 5 (WEB SERVICES) 2018-19 NOTES FOR PROGRAMS AND SOLUTION REFER CLASSROOM NOTES WE-IT TUTORIALS CLASSES FOR BSC-IT AND BSC-CS (THANE) 8097071144/55, WEB www.weit.in 50 Business constraints, Technology constraints, Run-time qualities The service construction phase Constructing a service: the provider perspective 1. There is an already existing implementation (service content) for the Web service, e.g., in Java code. By using this implementation the developer can build the service definition (WSDL document). 2. A service definition already exists in the form of a WSDL document. By using this WSDL document the designer can build or adapt the implementation (Java) code to realize that service. Constructing services: the client perspective 1. A static client is created at construction time by locating the service implementation definition for the single Web service that will be used by the service requestor. 2. A dynamic client is used when a service requestor wants to use a specific type of Web service with a known service definition whose implementation is not known until run-time or can change at run-time. The service test phase Service testing is generally characterized as a validation exercise at the physical level, ascertaining that requirements have been met and that the deliverables are at an acceptable level and in accordance with existing standards during the analysis, design, and construction phases of the services lifecycle. • Functional testing covers how well the service executes the functions it is expected to execute • performance testing in service-oriented environments is monitoring service on-line response times and transaction rates under peak workload conditions • interface testing is to ensure that any service is developed to properly interface with other service functions outside of its surrounding process. • assembly testing ensures that all services function properly when assembled into business processes.