8/8/2019 SOAP, WSDL, And Discovery
1/23
SOAP, WSDL, and
Discovery
Unit-4 C# & Dot NET Framework
8/8/2019 SOAP, WSDL, And Discovery
2/23
Web Services
Web services are application components
Web services communicate using open
protocols
Web services are self-contained and self-
describing
Web services can be discovered using UDDI
Web services can be used by other applications XML is the basis forWeb services
8/8/2019 SOAP, WSDL, And Discovery
3/23
How Does it works?
The basic Web services platform is XML +
HTTP.
XML provides a language which can beused between different platforms and
programming languages and still express
complex messages and functions.
The HTTP protocol is the most used
Internet protocol.
8/8/2019 SOAP, WSDL, And Discovery
4/23
Web services platform elements
SOAP (Simple Object Access Protocol)
UDDI (Universal Description, Discovery
and Integration) WSDL (Web Services Description
Language)
8/8/2019 SOAP, WSDL, And Discovery
5/23
Purpose
.NET Web Services expand on the concept of
distributed processing to build components
whose methods can be invoked across the
Internet. These components can be built in any
.NET language, and they communicate using
open protocols that are platform-independent.
W
eb Services takeW
eb-applications to the NextLevel
8/8/2019 SOAP, WSDL, And Discovery
6/23
Purpose
By using Web services, your applicationcan publish its function or message to therest of the world.
Web services use XML to code and todecode data, and SOAP to transport it(using open protocols).
WithWeb services you can exchange databetween different applications anddifferent platforms.
8/8/2019 SOAP, WSDL, And Discovery
7/23
Purpose
In such a world, a single application mightdraw on and stitch together the services ofhundreds of small web services
distributed all over the world. This takes the Web to an entirely new
dimension: not only is information
retrieved and exchanged, but alsomethods are invoked and applications areexecuted.
8/8/2019 SOAP, WSDL, And Discovery
8/23
Web Services have Two Types of Uses
Reusable application-components.
There are things applications need very often. So why
make these over and over again?
Web services can offer application-components like:currency conversion, weather reports, or even
language translation as services.
Connect existing software.
Web services can help to solve the interoperabilityproblem by giving different applications a way to link
their data.
8/8/2019 SOAP, WSDL, And Discovery
9/23
List ofWeb Services
The list of web services that might be useful todevelopers and end users seems boundless.
A bookstore might provide a web service thattakes an ISBN and returns the price andavailability of a title.
A hotel's web service might take a date rangeand number of guests and return a reservation.
Another web service might take a telephone
number and return a name and address. Yet another might provide information about the
weather or shuttle launches.
8/8/2019 SOAP, WSDL, And Discovery
10/23
.NET services
Microsoft has announced a number ofcommercial .NET services as part of its .NET MyServices initiative.
Among these are its Passport service foridentifying and authenticating users(http://www.passport.com/), as well as servicesfor managing storage, notification,
appointments, and a host of other applications. These services, as well as the ones you write,can be integrated with your applications just likeany other business object.
8/8/2019 SOAP, WSDL, And Discovery
11/23
What is needed to make web services possible
is a simple, universally accepted protocol for
exposing, finding, and invoking web service
functions. In 1999, Simple Object Access Protocol
(SOAP) was proposed to the World Wide
Web Consortium. SOAP has the advantages
of being based on XML and of using standard
Internet communications protocols.
8/8/2019 SOAP, WSDL, And Discovery
12/23
Why SOAP ?
It is important for application development to allowInternet communication between programs.
Today's applications communicate using RemoteProcedure Calls (RPC) between objects like DCOM and
CORBA, but HTTP was not designed for this. RPCrepresents a compatibility and security problem; firewallsand proxy servers will normally block this kind of traffic.
A better way to communicate between applications isoverHTTP, because HTTP is supported by all Internetbrowsers and servers. SOAP was created to accomplish
this. SOAP provides a way to communicate between
applications running on different operating systems, withdifferent technologies and programming languages
8/8/2019 SOAP, WSDL, And Discovery
13/23
SOAP
SOAP is an XML-based protocol to let applications exchangeinformation overHTTP.
Or more simple: SOAP is a protocol for accessing aWeb Service.
SOAP stands for Simple Object Access Protocol
SOAP is a communication protocol
SOAP is a format for sending messages SOAP is designed to communicate via Internet
SOAP is platform independent
SOAP is language independent
SOAP is based on XML
SOAP is simple and extensible SOAP allows you to get around firewalls
SOAP is a W3C standard
8/8/2019 SOAP, WSDL, And Discovery
14/23
SOAP
SOAP is a lightweight, message-based protocol built onXML, HTTP, and SMTP.
Two other protocols are desirable, but not required, for aclient to use a SOAP-enabled web service: a description of the methods provided by a particular service that
can be understood and acted upon by clients, and a
description of all such services available at a particular site orURL.
The first of these is provided in .NET by the Web Service
Description Language (WSDL) protocol, jointly developed byMicrosoft, IBM, and others.
Two other protocols have been proposed for discovery: UDDI, ajoint effort by a number of companies including IBM andMicrosoft, and Discovery, a proprietary offering from Microsoft.
8/8/2019 SOAP, WSDL, And Discovery
15/23
SOAP Building Blocks
A SOAP message is an ordinary XML document
containing the following elements:
An Envelope element that identifies the XML
document as a SOAP message
A Header element that contains header information
A Body element that contains call and response
information
A Fault element containing errors and status
information
8/8/2019 SOAP, WSDL, And Discovery
16/23
WSDL
WSDL is an XML schema used to describe theavailable methods and the interface of a webservice.
WSDL is an XML-based language for locatingand describing Web services.
WSDL stands forWeb Services DescriptionLanguage WSDL is based on XML
WSDL is used to describe Web services WSDL is used to locate Web services
WSDL is a W3C standard
8/8/2019 SOAP, WSDL, And Discovery
17/23
WSDL
A WSDL document is just a simple XML document.
It contains set of definitions to describe a web service.
The WSDL Document Structure
AW
SDL document describes a web service using thesemajor elements:
-The data types used by the webservice
The messages used by the web service
The operations performed by the web service
The communication protocols used by the webservice
8/8/2019 SOAP, WSDL, And Discovery
18/23
main structure of a WSDL
document definition of types........
definition of a message....
definition of a port.......
definition of a binding....
8/8/2019 SOAP, WSDL, And Discovery
19/23
UDDI
UDDI is a directory service where companiescan register and search forWeb services.
UDDI stands for Universal Description,
Discovery and Integration UDDI is a directory for storing information about
web services
UDDI is a directory of web service interfaces
described by WSDL UDDI communicates via SOAP
UDDI is built into the Microsoft .NET platform
8/8/2019 SOAP, WSDL, And Discovery
20/23
What is UDDI Based On?
UDDI uses WorldWideWeb Consortium (W3C)and Internet Engineering Task Force (IETF)Internet standards such as XML, HTTP, and
DNS protocols. UDDI uses WSDL to describe interfaces to web
services
Additionally, cross platform programming
features are addressed by adopting SOAP,known as XML Protocol messagingspecifications found at the W3CWeb site.
8/8/2019 SOAP, WSDL, And Discovery
21/23
UDDI Benefits
Any industry or businesses of all sizes can benefit from UDDI.
Before UDDI, there was no Internet standard for businesses to reach theircustomers and partners with information about their products and services.Nor was there a method of how to integrate into each other's systems andprocesses.
Problems the UDDI specification can help to solve:
Making it possible to discover the right business from the millions currentlyonline
Defining how to enable commerce once the preferred business isdiscovered
Reaching new customers and increasing access to current customers
Expanding offerings and extending market reach
Solving customer-driven need to remove barriers to allow for rapidparticipation in the global Internet economy
Describing services and business processes programmatically in a single,open, and secure environment
8/8/2019 SOAP, WSDL, And Discovery
22/23
How can UDDI be Used?
If the industry published an UDDI standardfor flight rate checking and reservation,airlines could register their services into an
UDDI directory. Travel agencies couldthen search the UDDI directory to find theairline's reservation interface. When theinterface is found, the travel agency can
communicate with the service immediatelybecause it uses a well-defined reservationinterface.
8/8/2019 SOAP, WSDL, And Discovery
23/23
Who is Supporting UDDI?
UDDI is a cross-industry effort driven by all
major platform and software providers like
Dell, Fujitsu, HP, Hitachi, IBM, Intel,
Microsoft, Oracle, SAP, and Sun, as well
as a large community of marketplace
operators, and e-business leaders.
Over 220 companies are members of theUDDI community.