fishnibblersspongyDéveloppement de logiciels

14 déc. 2013 (il y a 3 années et 3 mois)

46 vue(s)


Goals of this chapter

Provide an overview on most recent

Illustrate the importance of XML

Allow students to understand the
interconnections of the technologies

Allow students to see interconnections with
based architectures

Allow students to estimate future development

Web Services

What Is an XML Web Service?

XML Web services are the fundamental building blocks
in the move to distributed computing on the Internet.

Open standards and the focus on communication and
collaboration among people and applications have
created an environment where XML Web services are
becoming the platform for application integration.

Applications are constructed using multiple XML Web
services from various sources that work together
regardless of where they reside or how they were

Examples: Transaction handling, calendar service, …

Web Services Introduction


Web services have become influential since about 2002

Strong impetus for development of both major enterprise

.NET (Microsoft)

J2EE (Sun Microsystems)

Users, e.g.:

U.K. government: Employs web services in creating an Internet
infractructure for all government services by 2005.

Software vendors such as Sun, Oracle Corp., are including web
services protocols in their platform and development tools.

Microsoft is planning to offer public web services, notably .NET
Passport that lets you use your email address and a single password for
secure sign
on to any participating web site.

Web Services


Three waves of web service deployment

: support complex supply chains

: Web service protocols used to extend internal
EAI (Enterprise Application Integration) efforts.

Dominant mode of deployment will be mixed J2EE
and .NET, hence interoperability is essential

: full
blown adoption of services; will be delayed
until standards are finalized.

Web services offer a fine
grained approach to EAI and
thus provide attractive means for companies who want to
outsource just few particular functions.

Web Services

Definition (one of several!)

XML Web Services expose useful functionality to
Web users through a standard Web protocol. In most
cases, the protocol used is SOAP.

XML Web services provide a way to describe their
interfaces in enough detail to allow a user to build a
client application to talk to them. This description is
usually provided in an XML document called a Web
Services Description Language (WSDL) document.

XML Web services are registered so that potential
users can find them easily. This is done with
Universal Discovery Description and Integration

What can one do with web

Exposing existing applications as XML Web services will
allow users to build new, more powerful applications that
use XML Web services as
building blocks

For example, a user might develop a purchasing
application to automatically obtain price information from
a variety of vendors, allow the user to select a vendor,
submit the order and then track the shipment until it is

The vendor application, in addition to exposing its
services on the Web, might in turn use XML Web
services to check the customer's credit, charge the
customer's account and set up the shipment with a
shipping company.

Web Services

Easier than CORBA and DCE

Significant advantage over previous
efforts: web services work with standard
Web protocols


Most of the information provided by web
services is available now on the Web, but
XML Web services will make
programmatic access to it easier and more


SOAP is the communications protocol for XML
Web services.

SOAP is a specification that defines the XML
format for messages.

SOAP message: a well
formed XML fragment
enclosed in a couple of SOAP elements.

The Current SOAP standard assumes security is
a transport issue and is silent on security issues.


Optional parts of the SOAP specification
describe how to represent program data as XML
and how to use SOAP to do Remote Procedure

They are used to implement RPC
applications where a SOAP message containing
a callable function, and the parameters to pass
to the function, is sent from the client. The server
returns a message with the results of the
executed function.

Most current implementations of SOAP support
RPC applications.


SOAP also supports document style applications
where the SOAP message is just a wrapper
around an XML document. Document
SOAP applications provide flexibility for many
new XML Web services.

The last optional part of the SOAP specification
defines the format of an HTTP message that
contains a SOAP message.

The HTTP binding is optional, but almost all
SOAP implementations support it because it's
the only standardized protocol for SOAP.

Web Services Description
Language WSDL

WSDL file: XML document describing a set of SOAP
messages and how they are exchanged.

WSDL is to SOAP what IDL is to CORBA or COM.

Since WSDL is XML, it is readable and editable but in
most cases, it is generated and consumed by software.

WSDL specifies what a request message must contain
and what the response message will look like in an
unambiguous notation.

A WSDL file defines everything required to write a
program to work with an XML Web service.


The WSDL notation is based on the XML Schema

It is programming
language neutral and standards

It is suitable for describing XML Web services interfaces that are
accessible from a wide variety of programming languages.

In addition to describing message contents, WSDL
defines where the service is available and what
communications protocol is used to talk to the service.

There are several tools available to read a WSDL file
and generate the code required to communicate with an
XML Web service.

Many current SOAP toolkits include tools to generate
WSDL files from existing program interfaces, but
currently there are few tools for writing WSDL directly.

WSDL Document Structure

A WSDL document is made up of 5 sections.

The WSDL document can be divided into two
groups of sections.

The top group is comprised of Abstract Definitions,


sections define SOAP messages in a platform

and language
independent manner; they do not contain any

nor language
specific elements. This helps define a
set of services that several, diverse Web sites can

The bottom group consists of Concrete Descriptions.


matters such as serialization are then relegated
to the bottom sections, which contain concrete descriptions.

WSDL Document Structure


Abstract Definitions



and language
independent type definitions.


Contains function parameters (inputs separate from
outputs) or document descriptions.


Refers to message definitions in Messages section to
describe function signatures

Concrete Descriptions


Specifies binding(s) of each operation in the PortTypes


Specifies port address(es) of each binding.

Universal Discovery Description
and Integration


llows one to search for a company that offers the services
one needs, read about the service offered and contact someone for
more information.

A UDDI directory entry is an XML file that describes a business and
the services it offers. There are three parts to an entry in the UDDI

The "white pages" describe the company offering the service: name,
address, contacts, etc.

The "yellow pages" include industrial categories based on standard
taxonomies such as the Standard Industrial Classification.

The "green pages" describe the interface to the service in enough detail
for someone to write an application to use the Web service.

Services are defined through a UDDI document called a Type Model
or tModel. In many cases, the tModel contains a WSDL file that
describes a SOAP interface to an XML Web service.

What's Left?

SOAP, WSDL, and UDDI constitute a set of baseline
specifications that provide the foundation for application
integration and aggregation. From these, companies are
building real solutions and getting real value from them.

Today, people are having success with XML Web
services, but there are still things that are left, e.g.
security, operational management, transactions, reliable

The Global XML Web Services Architecture will help
take XML Web services to the next level by providing a
coherent, general purpose model for adding new
advanced capabilities to XML Web services which is
modular and extensible.

Web Services and Distributed Objects:
Competing or Complementary?


The premise is that, when used correctly, Web services
and distributed objects have different paradigms
oriented" and "object
and that a
combination of both paradigms is required to achieve
end business integration.

The object
oriented platforms CORBA and J2EE have
been successful for building and integrating applications

the enterprise

The document
oriented XML technologies associated
with Web services are rapidly gaining popularity for
business integration


Total business integration needs to address both these

Oriented vs. Document

Web services look like yet another
distributed object system. It is tempting to
expose existing CORBA or Java objects
as Web services by mapping them to

However, XML is document
oriented, not
oriented. Web services should
document exchange systems

and not distributed object systems.

Oriented vs. Document

Document exchange systems have:

Larger, richer data structures
so much richer that we
call them "documents"

Looser coupling between agents

More asynchronous communication

Communicating objects have:

Simple data structures

Tight coupling

Synchronous communication:

Because of the tight
coupling one must be able to associate replies with

Web Services and Distributed Objects

Design Issues

Distributed object platforms are the ideal underpinning
for a Web service.

Some of the distributed objects have to be designed with
the knowledge that they are going to be Web services.
These "service objects" will typically delegate their work
to many smaller
grained distributed objects in a
distributed system that underlies the Web service.

Larger chunks of data will be passed in a single call than
the objects in the underlying distributed system.

Web services are built on distributed objects; distributed
objects are built on nondistributed programming objects.
At each step, the granularity becomes finer.

Web Services and Distributed Objects

Application Areas

Web services are unlikely to perform adequately as high
performance system components because of the size
and parsing overhead of XML documents.

For example, it's hard to imagine a telephone exchange being
successfully implemented as a set of intercommunicating Web

However, it's easy to imagine some types of

such as
allowing other carriers to request special phone numbers on their
network to such a system as Web services.

Web services are ideal in the case that one cannot
assume agreement on CORBA or EJB interfaces.

Use distributed objects to build high
systems with a well
defined architecture, and Web
services to connect independent systems in a loosely
coupled fashion based on shared business processes
and documents.


Microsoft® .NET is a set of Microsoft software
technologies for connecting information, people,
systems, and devices. It enables a high level of software
integration through the use of XML Web services

discrete, building
block applications that connect to each
other as well as to other, larger applications over the

.NET is infused into the products that make up the
Microsoft platform, providing the ability to quickly and
reliably build, host, deploy, and utilize connected
solutions using XML Web services, all with the protection
of industry
standard security technologies.

Basic Elements of .NET

Smart Devices and.NET

Each smart device optimizes the way information is presented and

from converting text to speech to recognizing

Using XML, SOAP, and UDDI, smart devices are able to consume
XML Web services.

Smart devices are PCs, laptops, workstations, phones, handheld
computers, Tablet PCs, Microsoft® Xbox™ game consoles,… What
makes them "smart" is their ability to access XML Web services,
enabling you to interact with your data regardless of the location,
type, and number of devices you use.

Smart devices allow access to your information in an appropriate
form anytime and anywhere.

Smart devices "consume" (use) XML Web services and provide
Microsoft .NET experiences.

Microsoft Servers and .NET

With Microsoft® .NET, businesses will be able to turn key processes
into XML Web services. From the schedule for a doctor's office to
the catalog for a book seller to an exchange rate calculator for world

Windows Servers facilitate the aggregation and accelerate the
integration of systems, applications, and partners using XML Web
services through the servers' deep level support of XML.

Simple access to mainframes with Microsoft Host Integration Server

Automatic conversions of existing data formats into XML with
Microsoft BizTalk Server.

Scalable servers that deeply integrate XML and are protected by
standard technologies will provide the backbone for hosting
and deploying .NET software and services.

Microsoft Windows® 2000 Server, Microsoft Windows Server 2003, and
the Microsoft .NET Enterprise Servers fill this role.

Developer Tools and .NET

With Microsoft® Visual Studio® .NET and the Microsoft .NET Framework,
developers can develop XML Web services quickly and integrate them
easily with other applications.

Existing skills, can be deployed, because the .NET Framework allows you
to develop Web services using any modern program language.

Microsoft Visual Studio .NET and the Microsoft .NET Framework supply a
complete solution for developers to build, deploy, and run XML Web

These tools help enhance the performance, reliability, and security of XML
Web services.

Microsoft Visual Studio .NET represents the best development environment
for .NET
connected software and services.

Visual Studio .NET advances the programming languages:

Microsoft Visual Basic®, with new object
oriented programming features;

Microsoft Visual C++®, which enables you to build .NET
connected applications;

C#, which brings RAD to the C and C++ developer.

MapPoint® .NET

Microsoft® MapPoint® .NET is a hosted,
programmable XML Web Service for integrating
maps, driving directions, distance calculations,
proximity searches and other location
intelligence into your applications, business
processes, and Web sites.