Introduction To Web Services: January 2007
Introduction To Web Services: January 2007
net/publication/236860265
CITATIONS READS
9 1,248
5 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Jorge Cardoso on 16 May 2014.
LSDIS Lab
Computer Science Department
University of Georgia
Athens, GA 30602
*contact jam@[Link]
Jorge Cardoso
Department of Mathematics and Engineering
University of Madeira
9000-390 - Funchal
jcardoso@[Link]
1
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
ABSTRACT
This chapter introduces the theory and design principles behind Web Service
the authors hope that this chapter will provide sufficient background information along
with information about current areas of research in the area of Web Services that readers
will come away with an understanding of how this technology works and ways that it
Introduction
As the World-Wide Web (WWW) exploded into the lives of the public in the 1990’s,
people suddenly had vast amounts of information placed at their fingertips. The system
groups. The original WWW consisted of documents (i.e., Web pages) and links between
documents. The initial idea of the WWW was to develop a universal information
database to publish information that could be accessed in a reliable and simple way by
consumers. The information would not only be accessible to users around the world, but
information would be linked so that it could be easily browsed and quickly found by
organize, and distribute their internal data and information to customers and partners.
2
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
solutions, they realized that the initial technologies associated with the WWW were not
sufficient to sell products over the Internet. Additional functionality was required to
guarantee that transactions were conducted in a secure way. To this end, SSL (Secure
Sockets Layer), a protocol defined by Netscape, was developed for transmitting private
documents via the Internet. Using SSL, organizations were able to implement a solution
disparate legacy systems, applications, processes, and data sources. In order to meet
EAI platforms were used for integrating incompatible and distributed systems such as
SCM (Supply Chain Management), databases, data sources, data warehouses, and other
important internal systems across the corporate enterprise. While useful, most EAI
3
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
frameworks required costly and proprietary protocols and formats, which presented
many technical difficulties when it was needed to integrate internal systems with
The limitations of EAI solutions made most organizations realize that integrating
internal systems with external systems to business supply chain members was a key to
staying competitive, since the majority of business processes spanned across several
could carry out business transactions more efficiently with their business partners (such
as resellers and suppliers). To reach a higher level of integration, most B2B solutions
have relied on the use of XML as the language to represent data. XML allows one to
model data at any level of complexity since it is extensible with the addition of new
tags. Data can be published in multiple formats. In contrast to the proprietary protocols
used by EAI platforms, XML is vendor and platform independent allowing standard
Many organizations have already seen and experience the advantages in using XML
Nevertheless, organizations realized that their B2B strategies have lead the development
deploying and managing discrete pieces of computer logic (i.e., services) within the
4
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
WWW. The SOA goals are to achieve structuring, loose coupling, and standardization
series of discrete services in order to perform a certain task. A service is carried out by a
service provider in response to the request of a service consumer. The most prominent
implementation of the SOA principle uses XML and Web services as its technological
backbone.
Web services are based on distributed computing technology and provide a standard
organizational boundaries, using XML protocols and formats. Web Services comply
with several WWW standards, such as Web Services Definition Language (WSDL) and
standard XML protocols makes Web services platform, language, and vendor
technology and its standards. It begins in section 2, with a brief history of distributed
computing, which serves as the backdrop for the development of today’s Web service
technology. The guiding principle behind the development of Web service technology is
SOA which is described in section 3. Section 4 gives an overview of the role of Web
services in the context of SOA. This section gives a description of today’s standards and
Services Protocols. It looks in detail at the threats and standards relevant to the Web
Services Security landscape and examines problems and solutions in reliability and
transactions of Web Services. Clearly, these areas must be addressed before Web
service technology will be widely adopted. Section 6 explains how to develop Web
5
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Services starting from the initial design and continuing until deployment and
necessary to share data and resources. In the early years of distributed computing,
message passing (e.g., using for example sockets developed in the early 1980’s) was the
prevailing method for communication. This involved encoding the data into a message
format (i.e., how a structured piece of information is encoded prior to transmission) and
sending the encoded data over the wire. The socket interface allowed message passing
using send and receive primitives on Transmission Control Protocol (TCP) or User
Datagram Protocol (UDP) transport protocols for low-level messaging over Internet
protocol defined by programmers. This worked well but was cumbersome in the fact
that the data had to be coded and then decoded. Using this approach, two programmers
developing a distributed application must have knowledge of what the other is doing to
messaging protocol and mapping the various data structures to and from the common
transmission format.
use was Remote Procedure Call (RPC). RPC technology was made popular in the 1980s
by Sun Microsystems. RPC uses the client/server model and extends the capabilities of
6
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
traditional procedure calls across a network. Remote procedure calls are designed to be
similar to making local procedure calls. While in a traditional local procedure call
paradigm the code segments of an application and the procedure it calls are in the same
address space, in a remote procedure call the called procedure runs in another process
RPC (Birrell, 1995) proved to be an adequate solution for the development of two-
need to develop, for example, N-tier applications emerged and RPC could not provide
the same set of data. Therefore, the state of that data became of great concern. Research
in the area of distributed objects allowed overcoming this problem with the
Architecture (CORBA) and Distributed Common Object Model (DCOM). Later, Java
Remote Method Invocation (RMI) was developed and also became a competitor.
The CORBA [4, 5] standard was developed by the Object Management Group
(OMG) starting in the 1990’s and defines an architecture that specifies interoperability
communicate regardless of the operating system they are running on (for example,
written in various languages (such as Java, C++, C, Ada, etc.). The main component of
CORBA is the ORB (Object Request Broker). Objects residing in a client make remote
requests using an interface to the ORB running on the local machine. The local ORB
sends the request to the remote ORB, which locates the appropriate object residing in a
7
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
server and passes back an object reference to the requester. An object residing in a client
can then make the remote method invocation of a remote object. When this happens the
ORB marshals the arguments and sends the invocation over the network to the remote
object’s ORB which invokes the method locally and sends the results back to the client.
reliable, secure, and efficient manner. DCOM is an extension of the Component Object
components and their clients interact. COM allows the development of software
integrated. The distributed COM protocol extends the programming model introduced
by COM to work across the network by using proxies and stubs. Proxies and stubs
allow remote objects to appear to be in the same address space as the requesting object.
When a client instantiates a component that resides outside its address space, DCOM
creates a proxy to marshal methods calls and route them across the network. On the
server-side, DCOM creates a stub, which unmarshals method calls and routes them to
Java RMI (Dwoning, 1998) is a package for writing and executing distributed Java
programs by facilitating object method calls between different Java Virtual Machines
(JVM) across a network. Java RMI hides most of the aspects of the distribution and
provides a conceptually uniform way by which local and distributed objects can be
server skeleton and a client stub, and a client implementation. The server
implementation creates remote objects that conform to the server interface. These
objects are available for method invocation to clients. When a client wishes to make a
8
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
remote method invocation it invokes a method on the local stub, which is responsible
for carrying out the method call on the remote object. The stub acts as a local proxy. A
server skeleton exists for each remote object and is responsible to handle incoming
CORBA, DCOM, and Java RMI enjoyed considerable success, but they present a set
of shortcoming and limitations when used in Web environments. For example, they tend
to create tightly-coupled distributed systems, some are vendor and platform specific
(e.g., COM/DCOM only runs on Windows), the distributed systems developed run on
closely administered environment, some use complex and proprietary protocols, and
specific message formats and data representation. With the growth of the Web, the
search soon started for a Web compliant replacement for this technology. In the next
sections, we will see that Web services are currently the most natural solution to
Service-Oriented Architecture
As we have seen, in the 1980’s distributed computing was introduced. This research led
distributed platforms developed, such as Java RMI and DCOM, had several restrictions.
For example, RMI was limited to Java, while DCOM was limited to Microsoft
difficult to integrate. Integration was and is still one of the major concerns for Chief
9
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Deregulation 3%
Other 4%
the early 2000’s, the concept of Service-Oriented Architecture (SOA) was introduced
(or reintroduced, since in reality, the concept SOA was defined by Sun in the late
1990’s to describe Jini (Waldo, 1999)). SOA describes an approach which facilitates the
development and composition of modular services that can be easily integrated and
In order for SOA to enjoy greater success than it predecessors, it should consider the
following attributes:
• Scalable – The past solutions were not designed with the scale of the Web in
10
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
of each other; the source can send the message independently of the target.
Tight coupling is not suitable for SOA since it leads to monolithic and brittle
service descriptions.
11
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
When comparing SOA with previous approaches we can find the following major
the client-server paradigm, have heavily asymmetric interaction model, are biased
accessible objects, and supports capability based service discovery (Cardoso, Curbera,
Sheth, 2004).
Most distributed computing technologies have the concept of services and are defined
by interfaces. While there are many different possibilities for developing an SOA (e.g.,
Web Services, Java RMI, DCOM, and CORBA), Web Services is currently the most
applications and services. Web Services provide many of the necessary standards that
are crucial for making a distributed system work. It should be noticed that using Web
Services does not necessarily mean that there is an SOA. Also, it is possible to have a
There are three common actions associated with a service in SOA - discovery,
request, and response. Discovery is the process of finding the service provides the
functionality that is required. A request provides the input to the service. The response
yields the output from the service. It follows easily that this architecture must have three
12
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
The beginning of this figure (step 1) shows the process that two participants would
become aware of one another. This is accomplished as the service provider publishes
the Web Service Description (WSD) and Semantics (Sem.) to a registry after which the
service requestor would discover that service. In step 2, the semantics and description
are agreed upon so that there will be no misunderstanding about the data that is being
exchanged during this communication. Once the WSD and semantics are accepted by
and loaded into both the participants (step 3) then they can interact to carry out the
A service provider may develop and deploy one or more Web services. Each service
must contain at least one operation. Operations are also referred to as endpoints because
they are the part of the service that actually does the processing.
13
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
accessible over the Internet (Curbera & Nagy, 2001). They are the most popular
component invokable over the Web via an XML (XML, 2005) message that follows the
SOAP (SOAP, 2003) standard. The component provides one or more operations for
performing useful actions on behalf of the invoking client. These operations and the
formats of the input and output messages are described using WSDL (Christensen &
Curbera, 2001). Being based on these Web standards makes Web services both
language neutral manner is vital for the widespread use of Web services. For general
usability, a service must be described and advertised. WSDL takes care of the
of its operations. Service providers describe their Web services and advertise them in a
universal registry called UDDI (UDDI, 2002). This enables service requestors to search
the registry and find services, which match their requirements. UDDI allows for the
creation of registries that are accessible over the Web. A registry contains content from
the WSDL descriptions as well as additional information such as data about the
provider. Clients may use one or more registries to discover relevant services.
called Moon Company is a product distributor. They keep track of their clients, goods,
and orders through a system that they have in-house. They do not want to provide
unlimited access to this system to their customers, but they would like their customers
to be able to place orders easier. Using Web services, the Moon Company can create an
interface to their interior system so that a customer can be looked up, and once
14
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
authenticated, order products. With these services in place, Moon needs only provide
the WSDL definitions of the services to their clients and the clients will be able to
compose any system on their side to handle ordering in any way they see fit. Since
Moon does not know what type of system their customers are using, other remote
The use of standard protocols is one of the aspects that allow SOA to deploy technically
compatible services. Currently, Web service standards are the preferred solution to
develop SOA-based products. Web services technology has gained a suitable degree of
maturity and is being used to easily publish business functions to an intranet or the
Internet for remote execution. Business functions can reside in popular applications
Some of the standards associated with Web services are indispensable to developing
Figure 4 Web Services and List Standards (Cardoso, Curbera, Sheth, 2004)
15
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
The most well-known protocols will be presented and discussed in this section, while
XML, SOAP, WSDL and UDDI (Graham & Simenov, 2002) are the fundamental
elements to deploy SOA infrastructures based on Web services (see Figure 3). XML is
the standard for data representation; SOAP specifies the transport layer to send
messages between consumers and providers; WSDL describes Web services; and UDDI
XML. XML, the emerging standard for data representation, has been chosen as the
language for describing Web services. XML is accepted as a standard for data
interchange on the Web allowing the structuring of data on the Web. It is a language for
semi-structured data and has been proposed as a solution for data integration problems,
because it allows a flexible coding and display of data, by using metadata to describe
the structure of data (using DTD or XSD). A well-formed XML document creates a
16
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
balanced tree of nested sets of open and closed tags, each of which can include several
attribute-value pairs.
SOAP (Simple Object Access Protocol). This standard defines the types and formats of
languages, operating systems, and platforms. Many software vendors are producing an
implementation of SOAP into their systems. Examples of major vendors include Sun,
Microsoft, and IBM. The latest version of the standard is SOAP 1.2
through the W3C standardization process some minor changes will certainly occur.
The current specification defines a skeleton that looks like the listing below. The
envelope defines the namespace of the SOAP specification and the encoding style that
was used to create this message. The Header section is optional and contains additional
information about the message. The Body section contains the data that is being
transferred.
<?xml version="1.0"?>
<soap:Envelope
xmlns:soap="[Link]
soap:encodingStyle="[Link]
<soap:Header>
...
</soap:Header>
<soap:Body>
...
<soap:Fault>
...
</soap:Fault>
</soap:Body>
</soap:Envelope>
Figure 6 SOAP Skeleton Listing (SOAP, 2002)
17
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
WSDL (Web Service Description Language). WSDL is the major language that
provides a model and an XML format to describe the syntactical information about Web
services. It is a W3C standard XML language for specifying the interface of a Web
service. This standard enables the separation of the description of the abstract
defining the interface that Web services provide to requesters. The definition of the
interface (called a port type in version 1.x and called interface in version 2.0) gives the
signatures for all the operations provided including operation name, inputs, outputs and
faults. Beyond the interface, information about the service itself and allowed bindings is
included in WSDL documents. The latest version of the standard is WSDL 1.1
([Link]
The following is brief and incomplete copy of a WSDL file. Notice how it defines the
type of data to be used, the operations that exist in the service and the type of inputs and
outputs that those operations require. With this information, a call to invoke any
<wsdl:definitions
targetNamespace="mooncompany"
xmlns:wsdl="[Link]
xmlns:wsdlsoap="[Link]
xmlns:xsd="[Link]
<wsdl:message name="SearchCustomerResponseMessage">
<wsdl:part element="impl:SearchCustomerResponse"
name="SearchCustomerResponse"/>
</wsdl:message>
<wsdl:portType name="SearchCustomer">
<wsdl:operation name="search">
<wsdl:input message="impl:SearchCustomerRequestMessage"/>
18
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
<wsdl:output message="impl:SearchCustomerResponseMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="CRMServiceSoapBinding"
type="impl: SearchCustomer ">
<wsdlsoap:binding style="document"
transport="[Link]
<wsdl:operation name="search">
<wsdlsoap:operation soapAction="search"/>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="CRMService">
<wsdl:port binding="impl:CRMServiceSoapBinding" name="CRMService">
<wsdlsoap:address
location="[Link]
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Figure 7 Partial WSDL Listing (Semantic Web Services Challenge, 2006)
standards available to register and discover Web services are based on the UDDI
enable discovery. The UDDI registry is supposed to open doors for the success of
service oriented computing, leveraging the power of the Internet. Hence the discovery
discovering relevant services among tens and thousands (or millions according to
service for locating WSDL descriptions of Web services. This standard defines the
information content and the type of access provided by service registries. These
registries provide the advertisement of the services that can be invoked by a client.
UDDI can store descriptions about internal Web services across an organization and
19
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Besides thecore standards discussed in section 4, there are several other standards
needed for Web services to be used in practice. This section gives a quick tour of some
of these standards.
query that yields ten services that match our keyword, or meet our input and output
specifications. Yet, at this point, we do not know what these services require of the
messages that will be exchanged. Policy in Web services adds this information to the
description. It allows the provider of the service to give all the information they see fit
about the service; requirements, capabilities, and quality. With this information, the best
service can be chosen from the discovered services based on much more complete
information than just functional requirements and keywords. (Verma, Akkiraju, &
Goodwin, 2005)
WS-Policy
capabilities of a service. In this since, a policy is nothing more that a set of assertions
that express the capabilities and requirements of a service. The specification WS-Policy
([Link] defines
terms that can be used to organize a policy. Once a provider has a policy defined in
XML, then he must publish that information by referencing it in the description of the
service.
20
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
WS-PolicyAttachment
This defines the method for attaching a policy to a WSDL file so that it can be
published to the UDDI and thus used in deciding on services. There are several
mechanisms defined for accomplishing this task. The simplest method is to write the
policy directly into the WSDL file. A more complex, and more powerful method is to
construct the policy as a stand alone file that is referenced in the WSDL file as a URI.
These references can exist at any element of the WSDL. WS-Policy and WS-
attached and direction for merging policies together to create an effective policy for an
Both WS-Policy and WS-PolicyAttachment have recently been submitted to W3C for
standardization.
In this section, we examine some of the concepts, theories, and practices in securing
Web services at an introductory level. Our aim is for you to become familiar with these
as well as the terms used. Security is a constantly changing arena driven by the changes
in associated technologies.
The World Wide Web, or Web, has in some way touched the lives of most people
positive way. This is because once a computer is connected to the Web; it becomes part
of a system that was not designed with security and privacy in mind. Computers hold
information, sometimes sensitive information, for much longer than most users realize.
Even during the simple event of entering information into a Web browser, information
is stored onto disk. This may take place in a temporary file. Although once the
information is sent to a Web server and the file is deleted, the information is still present
21
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
on the disk; even though the file reference is gone. Many unsavory characters have
learned how to glean this information off of remote systems through vulnerabilities of
minimal’. This is true not only on the Web but also in our daily lives. We lock our doors
when we leave our houses in an effort to keep unauthorized visitors out. This definition
is simple, but it is clear. A more complete definition may become too convoluted. Let us
consider a definition for privacy, ‘not making public what may be considered personal’.
Not a fancy definition, rather straight to the point. We all have different ideas of what is
personal to us, and what being made public means. However, I think we can all agree
that having our Social Security Number and checking account information sold to the
Now that security and privacy are defined, let us consider how this fits into the Web.
Suppose you would like to purchase a book online. Once you have found the book and
placed it in your “Cart” it is time to checkout. In order to checkout you must pass
through some security. Typically, you will be asked for your credit card information and
billing address. This is the first security checkpoint and this information is verified with
your bank; as well as making sure the card has not been reported stolen. The next
checkpoint is physical possession of the card, which is verified by a security code on the
back of your card. So, you the consumer trust this Web site to send the book, or you
would not have placed the order, and the Web site trusts you for payment since it has
verified all your information. Trust is a key component of security and privacy as we
shall see. As a consumer using sensitive personal information to make a purchase, have
between you and the Web site an agreement has been made; whereas, the Web site has
22
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
promised not to sell your personal information. However, how well is it protected? Your
credit card information, billing address, and security code are now stored in two places,
the Web sites server and on your PC. More than likely one of those unsavory characters
will not spend the time and effort to get one credit card number off a PC when with a
little more work they could have access to thousands of entries. So this brings us back to
security. This time that of the Web site server. As you can see, security and privacy go
The above scenario is a simple client-server process, much like those that currently
encompasses the Web. However, Web services extend the client-server model and are
Web services such promises in the SOA, it is also an area of concern for security and
privacy. The more doors and windows a home has, the more opportunities a thief has,
the more vigilant the home owner must be. This can be applied to Web services as well.
Web services increases the number of access points to data and ultimately machines.
Now that the stage has been set, let us look at the specific security and privacy
is difficult to determine the identity of the actors; in this case who is the service
requester and who is the service provider. Message level security and privacy is
for the requester and provider to have a protocol for discovering each others policies
agreements should be explicitly described and agreed upon. We will look more closely
23
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Message level security involves securing all aspects of the SOAP message.
Encryption plays a large role in providing integrity of messages between the requester
and the provider while traversing intermediaries. In addition, the requester and the
Unauthorized Access attack takes place when an attacker is able to gain access to a
Web service which they do not have permissions to use. This can happen through brute-
attacker may also pose as a legitimate Web Service in order to gain an authentication
The above threats can be alleviated using proper authentication and encryption
techniques. However, there are other attacks that can only be alleviated through good
SQL injection attack is the insertion of malicious SQL statements. This requires
to alleviate this threat. Command injection attacks are similar to SQL injection attacks
in that malicious system commands are injected into the SOAP in an effort to exploit
transport layer, such as VPN, SSL, or IPSec, provide a ‘secure tunnel’ for data to flow,
however, they can not guarantee the integrity of the message. End-to-End schemes,
24
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
which are implemented at the application layer, can guarantee the confidential integrity
of the message and that the message has not been altered. This is because the message is
encrypted and digitally signed with a key. End-to-End schemes also offer the
granularity necessary for Web services such that sections of the SOAP message may be
WS-Security Framework
The WS-Security specification provides a framework and vocabulary for requesters and
and privacy. There are other security related specifications worth mentioning. XML-
standard (RBAC). XACML will likely play an important function in Web services
for conveying user authentication and attribute information through XML assertions.
There are many specifications and standards for Web services security. We would like
WS-SecurityPolicy
Policies for Web services that describe the access permissions as well as actions which a
requester or provider are required to perform. For example, a policy may indicate that
requesters must have an active account with the service and that messages be encrypted
using a PKI scheme from a trusted Certificate Authority. A requester may also have a
25
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
WS-Trust
Before two parties are going to exchange sensitive information, they must establish a
However, one problem remains, how one party can trust the credentials of the other.
The Web Service Trust Language (WS-Trust) was developed to deal with this problem.
WS-SecureConversation
The Web Services protocol stack is designed to be a series of building blocks. WS-
SOAP extensions to define key exchange and key derivation from security context so
WS-Authorization
Authorization for Web services still remains an area of research at the time of this
authorization for a requester whom a Web service has just been introduced. Some
authorization frameworks being suggested include assertion based, role based, context
Assertion based authorization uses assertions about the requester to decided on the
level of authorization. In a role based approach, requesters are given ‘user’ labels and
these labels are associated with roles, which in turn have permissions assigned to them.
Context based authorization examines the context in which a requester is acting. For
instance: proximity to the resource, on behalf of a partnership, or even the time of day.
26
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
WS-Privacy
Privacy is in the context of data and can be associated with the requester or the provider.
The requester may be concerned that the information given to a provider will be
propagated to other entities. Such information could be a credit card number, address, or
which they have sold to a requester. In this case the provider does not want the requester
Transaction Processing
depends on the reliability of participants that are often beyond corporate boundaries. In
confidence in that the actions among them will progress successfully, and that in the
WS-Transaction
27
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
transactional systems with short interactions and full ACID properties. WS-BA, on the
other hand, is intended for applications involved in business processes of long duration,
whose relaxed properties increase concurrency and suit a wider range of applications.
Neither the Web services architecture nor any specifications prescribe explicit ways
should minimally impact existing applications. Some propose approaching the problem
requiring minimal application code changes (Vasquez, Miller, Verma, Sheth, 2005).
Reliability and management are aspects highly dependent on particular Web service
However, just like the J2EE Enterprise JavaBeans (EBJ) technology has made available
which the hosting application server becomes responsible for support activities such as
event logging and system recovery. These additional guarantees could potentially
improve many aspects of Web services reliability, taking part of the burden away from
logging and fault-tolerance, to cite just a few. Some implementations leading this
direction are already available from enterprise software companies such as Arjuna
(IBM Transactional Attitudes, 2005), and from open source projects like Apache
28
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Kandula (Apache Kandula Project, 2005) and the academic community (Vasquez,
Messaging
WS-ReliableMessaging
Communication over a public network such as the Internet imposes physical limitations
to the reliability of exchanged messages. Even though failures are inevitable and
At a minimum, senders are interested in determining whether the message has been
received by the partner, that it was received exactly once and in the correct order.
Additionally, it may be necessary to determine the validity of the received message: Has
the message been altered on its way to the receiver? Does it conform to standard
formats? Does it agree with the business rules expected by the receiver?
WS-Reliability and WS-ReliableMessaging have rules that dictate how and when
services must respond to other services concerning the receipt of a message and its
validity.
WS-Eventing
that should be in a Web service interface to allow for asynchronous messaging. WS-
WS-Notification
several capabilities.
29
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
WS-BaseNotification defines the operations and message exchanges that must take
operations required of a Notification Broker Service and those that wish to use it. WS-
Topics define the “topics” that are used to organize the elements in a notification
message. It also defines XML to describe the metadata associated with different topics.
The starting point of using Web service technology is to create Web services. Although
it is similar to developing other software, there are some differences in that early focus
on interfaces and tool support is of even greater importance. One can start by creating a
abstract class. Since tools such as Axis (Apache Axis Documentation , 2006) or Radiant
(Radiant , 2005) can convert one form to the other, it is a matter of preference where to
start. In this chapter we will give a guide to developing Web services starting by
the Web services. Start by creating a UML Class Diagram to define the requirements of
the system. To illustrate the ideas in this section, we will use an example from the
30
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Semantic Web Services Challenge 2006 (Semantic Web Services Challenge, 2006). The
Challenge scenario is to create a process to create a purchase order. The first step in this
Company”. Our example implements this service. Below are the eight steps to create
this service:
initial step is to create a UML Class Diagram to define the classes that will be
classes. The following is an example of a UML class diagram for a service that
will take as input the name of a business and search a database to return the
profile for this business if they are a partner of the Moon Company.
2. Generate Java Code. Using a UML tool such as Poseidon, the UML Class
Diagram can easily converted into a Java class skeleton. It is important to note
that while you are developing objects to be used for Web services that you must
31
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
“getters” and “setters” for every member variable. Fortunately, this is exactly the
code that will be generated thanks to the UML tool based on the diagram that we
have created in step one. For simplicity, we have generated our Web Service as
an abstract class.
compiler will know that the program code is a Web Service. A partial list of
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
• [Link]
The figure 9 illustrates an example of a Java service which has been annotated.
Note that in the example the @WebService and @WebMethod are the
annotations. The complier will recognize these tags and create the WSDL
document.
32
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
([Link]
4. Generate WSDL. The annotations from the previous step indicate to the
at compile-time. This description of the service is used in two ways. One, the
information gleaned from the WSDL file is published in UDDI registries so that
implementation class that extends our abstract class. The difference that the
developer must deal with is writing the code to the proper conventions. Any
class that is created must have getters and setters for all member variables. These
33
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
are used during invocation by the SOAP engine to serialize and deserialize the
data that is in the SOAP messages into Java objects and back to SOAP.
server and a SOAP engine, like Tomcat and Axis2 respectively. If using Axis2,
deploying a service is as simple as dropping the .aar files, which are .jar files
7. Test Service. A simple Java program can be sufficient to test a service. In others
it may require a more complex client. Either way the fundamentals for writing a
client are the End Point Reference, which is a URL to the service, a call setting
the target, and setting the transport information. All of this information is put
into a call object that exists in the [Link] package. The setup of this
object is below:
34
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
see an instance of this class is created and added as a parameter to the call
object.
This calls the invoke method on the call object to execute the operation in the
service. The results of the service are put into the Response object and can be
Setting up a registry varies based on which registry is chosen. For our example,
service is open to the world and ready to accept request, but until it is published,
it is unlikely that anyone will know about your service. Tools that simplify this
process are Radiant and Lumina (Li, 2005), both from the METEOR-S tool
suite.
CONCLUSIONS
the distributed systems technology of the 1990s, such as DCOM, CORBA, and Java
RMI. This type of architecture requires the existence of main components and concepts
35
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
SOA are often associated with Web services and sometimes, SOA are even confused
with Web services, but, SOA does not specifically mean Web services. Instead, Web
services can be seen as a specialized SOA implementation that embodies the core
a long way toward achieving the goal of the SOA. With Web services, developers do
not need to know how a remote program works, only the input that it requires, the
output it provides and how to invoke it for execution. Web services provide standards
and specifications that create an environment where services can be designed, executed,
For some years now, Web services define a set of standards (such as WSDL, SOAP,
and UDDI) to allow the interoperation and interoperability of services on the Internet.
Recently, security and transactional stability have become priority areas of research to
make Web services more accepted in the world of industry. The work done has lead to
Trust, WS-Privacy, WS-Transaction, etc.) that describe how Web services can establish
secure communications, define policies services’ interactions, and define rules of trust
between services.
36
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
REFERENCES
Birrell, Andrew D. and Bruce Jay Nelson, Implementing Remote Procedure Calls
ACM Trans. on Computer Systems, pp 39-54, 1984.
Booth, D. et al., Web Services Architecture, W3C Working Group Note”, 11 February
2004. from
[Link]
Brown, Nat and Charlie Kindel. Distributed Component Object Model Protocol,
DCOM/1.0. Microsoft Corporation, Redmond, WA, 1996.
Cardoso, J., Francisco Curbera, and Amit Sheth, Tutorial: Service Oriented
Archiectures and Semantic Web Processes, from
The Thirteenth International World Wide Web Conference (WWW2004), 17-22 May
2004, New York, USA.
Christensen, E., F. Curbera, et al. W3C Web Services Description Language (WSDL),
2001 from
[Link]
Curbera, F., W. Nagy, et al. (2001). Web Services: Why and How. Workshop on Object-
Oriented Web Services - OOPSLA 2001, Tampa, Florida, USA.
Graham, S., S. Simenov, et al. (2002). Building Web Services with Java: Making Sense
of XML, SOAP, WSDL, and UDDI, SAMS.
Li, Ke. (2005) Lumina: Using WSDL-S for Web Service Discovery Masters Thesis,
University of Georgia.
37
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
Mikalsen, T., Tai, S., Rouvellou, I.: Transactional Attitudes, (2002). Reliable
Composition of Autonomous Web Services. International Conference on Dependable
Systems and Networks.
Object Management Group. CORBA: The Common Object Request: Architecture and
Specification, July 1995, Release 2.0.
Orfali, R., D. Herkey. Client/Server Programming with Java and CORBA. 2nd edition,
John Wiley & Sons, 1998.
Trainotti, M., Pistore, M., Calabrese, G., Zacco, G., Lucchese, G., Barbon F., Bertoli,
P., Traverso P. ASTRO, (2005). Supporting Composition and Execution of Web
Services. International Conference on Service Oriented Computing.
Vasquez, I., Miller, J., Verma, A., Sheth, A., (2005). OpenWS-Transaction: Enabling
Reliable Web Service Transactions. International Conference on Service Oriented
Computing.
Verma, K., Rama Akkiraju, Richard Goodwin, (2005) Semantic Matching of Web
Service Policies, Second International Workshop on Semantic and Dynamic Web
Processes (SDWP 2005), Part of the 3rd International Conference on Web Services
(ICWS'05)
Waldo, J.. The Jini architecture for network-centric computing. Communications of the
ACM, 42(10):76–82, Oct. 1999.
38
Copyrights 2006,Authors, – DO NOT REDISTRIBUTE
XML (2005). Extensible Markup Language (XML) 1.0 (Third Edition), W3C
Recommendation 04 February 2004, from
[Link]
39