What Is WSDL?: Web Services

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Web services

The term Web services describes a standardized way of integrating Web-


based applications using the XML, SOAP, WSDL and UDDI open standards over an Internet
protocol backbone. XML is used to tag the data, SOAP is used to transfer the data, WSDL is
used for describing the services available and UDDI is used for listing what services are
available. Used primarily as a means for businesses to communicate with each other and
with clients, Web services allow organizations to communicate data without intimate
knowledge of each other's IT systems behind the firewall.

What is WSDL?
 WSDL stands for Web Services Description Language
 WSDL is written in XML - it is an XML-based language
 WSDL is an XML document
 WSDL is used to describe Web services (ie. the operations (or methods) the service
exposes)
 WSDL is also used to locate Web services
 WSDL is not yet a W3C standard

Network services are described as a set of endpoints which operate on messages containing
either document-oriented or procedure-oriented information. The operations and messages are
described abstractly, and then bound to a concrete network protocol and message format to
define an endpoint. Related concrete endpoints are combined into abstract endpoints (services).

WSDL is extensible to allow description of endpoints and their messages regardless of what
message formats or network protocols are used to communicate; typical bindings might be to
SOAP 1.1, HTTP GET/POST, and MIME.

A WSDL endpoint is the http address for a service e.g


http://example.com:18080/axis/services/AccountService.

The main parts of a WSDL document


Element Defines
<portType> The most important WSDL element. It defines a web service, the operations that can be performed, and the messages that

<message> The <message> element defines the data elements of an operation. Each messages can consist of one or more parts.

<types> The <types> element defines the data types that are used by the web service. For maximum platform neutrality, WSDL use
types.
<binding> The <binding> element defines the message format and communication protocol details for each port. It links the port type

The main structure of a WSDL document looks like this:

<definitions>
<types>
   definition of types........
</types>
<message>
   definition of a message....
</message>
<portType>
   definition of a port.......
</portType>
<binding>
   definition of a binding....
</binding>
</definitions>

A WSDL document can also contain other elements, like extension elements and a service
element that makes it possible to group together the definitions of several web services in one
single WSDL document.

WSDL Example
This is a simplified fraction of a WSDL document:

<message name="getTermRequest">
   <part name="term" type="xs:string"/>
</message>
<message name="getTermResponse">
   <part name="value" type="xs:string"/>
</message>
<portType name="glossaryTerms">
  <operation name="getTerm">
      <input message="getTermRequest"/>
      <output message="getTermResponse"/>
  </operation>
</portType>

In this example the portType element defines "glossaryTerms" as the name of a port, and
"getTerm" as the name of an operation.

The "getTerm" operation has an input message called "getTermRequest" and an output
message called "getTermResponse".

The message elements defines the parts of each message and the associated data types.

Compared to traditional programming, glossaryTerms is a function library, "getTerm" is a


function with "getTermRequest" as the input parameter and getTermResponse as the return
parameter.

What does WSDL do for me?


The use of WSDL means that all the Java methods exposed for a particular service can be
described. Axis also uses WSDL for the validation of incoming and outgoing HTTP requests eg.
to check the validity of the chosen method being called.

WSDL is also used for resource discovery by machines wanting to know what services are "out
there" to use.

So, in summary, WSDL provides request validation, describes methods and can be used for
resource discovery.

The OMII Client validates what it sends and what it gets back using WSDL. It is not essential
that a copy of the WSDL documents are also on client but it is easier for the client to have its
own trusted copy; this copy matches the copy on the server.

Getting a Look At Web Services


Web services promise to be the next major frontier in computing. Up until the advent of Web services, interoperability
and integration (the exchange of data among computer systems) were extremely limited or cumbersome. Prior to
Web services, limited integration took place with numerous technologies, vendors, obstacles, and formats that
prevented the sharing of data. Then Web service technology came along and changed all that.
What the heck are Web services?
Web services encompass the technology that's used in allowing data to be transmitted across the Internet by using a
familiar programming methodology. Only data are transmitted using Web services technology; Web services do not
have a visual interface, such as text boxes, radio buttons, and the like.
For example, a Web service may be offered in a B2B (business to business) scenario whereby Company A provides
a currency conversion Web service and Company B, in turn, uses this Web service to provide the currency
conversion functionality to its customers. The Web service offered by Company A can also be used by Company C in
a different capacity. For example, Company C may combine Company A's Web service with other functionality and
offer it as a Web service to other companies. In both scenarios, specific functionality is developed and made available
as a programmable Web service that can be accessed by other companies over the Internet.
The term Web services means something different to each person, depending on his or her interest. Executives are
likely to not understand exactly how the Web services technology can simplify development, but they are going to
understand the high return on investment (ROI). Conversely, developers and architects will likely understand that the
Web services technology can help shorten development time and drastically make connectivity easier, but they won't
grasp the immediate benefits of high ROI. Typically, developers and architects simply want to implement the coolest
solution and use the latest and greatest technologies.
Web services is a technology for transmitting data over the Internet and allowing programmatic access to that data
using standard Internet protocols. The term Web service is not used to represent a company who simply offers
services on the Web, such as a banking Web site. Although such a company offers a service over the Web, it doesn't
necessarily make its service available by using a programmatic interface that allows two applications to be integrated.
In fact, a Web service allows a developer to include functionality into a program without needing to "reinvent the
wheel" and without needing to know anything about the business or complexity of the Web service that he or she is
using.
What Web services can do for you
Web services is a broad term that represents all the technologies used to transmit data across a network by using
standard Internet protocols, typically HyperText Transfer Protocol (HTTP). An eXtensible Markup Language (XML)
format is used to represent the data, which is why Web services are sometimes known as XML Web services.
You can think of an individual Web service as a piece of software that performs a specific task (also known as
a function), and makes that task available by exposing a set of operations that can be performed (known
as methods or Web methods) with the task. Additionally, each of the methods exposes a set of variables that can
accept data passed into the method. These variables are known as parameters or properties. Together, the
properties and methods refer to a Web service's interface. For example, Company A creates a Web service that
provides currency rate functionality, which may expose a method called GetRate. Company B is then able to pass a
parameter called CountryCode into the GetRate method. The GetRate method takes the CountryCode parameter,
looks up the appropriate currency rate in a database, and returns the rate back to the program that requested it.
In this example, which database did Company A use to access the currency rate information? What was the name of
the database server? What communication mechanisms and security mechanisms were used to access the database
server? The answer to all of these questions is, "It doesn't matter." The beauty of a Web service is the concept
ofencapsulation. Encapsulation allows the complexity of retrieving the actual currency rate to be completely self-
contained within the company that created the Web service (Company A). The only thing that Company B knows is
that they called a Web service to get a currency rate and it was given to them.
Web services are made possible by placing the programs, or applications, on a Web server, such as Microsoft
Internet Information Server (IIS). Because the application resides on a Web server, it can be called, or invoked, from
any other computer on the network by using HTTP. The Web service provides seamless distributed computing across
the entire network, as long as both sides know how to use a Web service.
One major advantage of invoking or creating Web services over HTTP is that if the Web server is on the Internet, the
network administrators on both ends of the data transmission don't have to open any additional ports in their firewalls.
All transmission of data is sent across port 80 (typically) by using HTTP. Port 80 is always open in a firewall because
it is the same port used to browse the Internet. The fact that the network administrators don't need to open additional
ports means that you face virtually no additional security risk in using Web services.
Another major advantage in Web services is that (because Web services conform to open standards) a Web service
written on one platform (such as the Microsoft platform) can call another Web service written on another platform
(such as Linux).
Because of their innate flexibility, Web services make the notion of software as a service a real possibility. And
because Web services provide integration between two systems, software as a service refers to the possibility of not
having to install software on workstations or servers, but rather, being able to use it from across the Internet.
Web services can change the way you use all your computing resources by doing the following:
 Save hassle: Imagine you need to install Microsoft Office. If Microsoft decides that they want to make Office
available as a Web service, you don't have to go out, purchase the software, and install it out of the box to all
the computers in your network. Instead, you can get the full functionality of that piece of software across a Web
interface without any installation at all.
 Save money: Imagine renting or leasing software instead of buying it. You can "break your lease" when and
if the applications aren't working for your organization, which can save you lots of money.
 Stay ahead of the game without even trying: Imagine not having to keep up-to-date with the latest
version. The latest version is always available from the vendor who provides the software as a service.
What you're really doing when you use software as a service this way is outsourcingfunctions that you used to
perform within your organization.

You might also like