Web Designing Tips

If You Can Watch This, So Can Your Customers

Place Your Ad Here

 

 

Share This Website

Yocto Recommendations

Buy Best Selling Web

Development Products

Amazon.com Widgets

 

Yocto Promotions On

Top Featured Products

Superb web hosting

 

One-way backlinks for higher rankings! linkvana.com

 

Find a sponsor for your web site. Get paid for your great content. shareasale.com.

 

www.yocto-web-development.com

A Place To Learn And Find Everything Necessary For Best Web Business Development

Learn WSDL

WSDL (Web Services Description Language) is an XML-based language for describing Web services and how to access them.

Buy Our Top Recommended Guide On Understanding Web Services: XML, WSDL, SOAP, and UDDI

Introduction to WSDL


WSDL is an XML-based language for describing Web services and how to access them.


What You Should Already Know

Before you continue you should have a basic understanding of the following:

  • XML
  • XML Namespaces
  • XML Schema

What is WSDL?

  • WSDL stands for Web Services Description Language
  • WSDL is written in XML
  • WSDL is an XML document
  • WSDL is used to describe Web services
  • WSDL is also used to locate Web services
  • WSDL is a W3C recommendation

WSDL Describes Web Services

WSDL stands for Web Services Description Language.

WSDL is a document written in XML. The document describes a Web service. It specifies the location of the service and the operations (or methods) the service exposes.

Buy Perspectives on Web Services: Applying SOAP, WSDL and UDDI to Real-World Projects (Springer Professional Computing)


WSDL is a W3C Recommendation

WSDL became a W3C Recommendation 26. June 2007.

WSDL Documents


A WSDL document is just a simple XML document.

It contains set of definitions to describe a web service.


The WSDL Document Structure

A WSDL document describes a web service using these major elements:

Element Defines
<types> The data types used by the web service
<message> The messages used by the web service
<portType> The operations performed by the web service
<binding> The communication protocols used by the web service

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 Ports

The <portType> element is the most important WSDL element.

It describes a web service, the operations that can be performed, and the messages that are involved.

The <portType> element can be compared to a function library (or a module, or a class) in a traditional programming language.

Create a professional website with Yola Silver for less than $10 a month - Easy to use and with unlimited website templates!


WSDL Messages

The <message> element defines the data elements of an operation.

Each message can consist of one or more parts. The parts can be compared to the parameters of a function call in a traditional programming language.


WSDL Types

The <types> element defines the data types that are used by the web service.

For maximum platform neutrality, WSDL uses XML Schema syntax to define data types.


WSDL Bindings

The <binding> element defines the message format and protocol details for each port.


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 messagecalled "getTermResponse".

The <message> elements define 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.

WSDL Ports


A WSDL port describes the interfaces (legal operations) exposed by a web service.


WSDL Ports

The <portType> element is the most important WSDL element.

It defines a web service, the operations that can be performed, and the messages that are involved.

The port defines the connection point to a web service. It can be compared to a function library (or a module, or a class) in a traditional programming language. Each operation can be compared to a function in a traditional programming language.


Operation Types

The request-response type is the most common operation type, but WSDL defines four types:

Type Definition
One-way The operation can receive a message but will not return a response
Request-response The operation can receive a request and will return a response
Solicit-response The operation can send a request and will wait for a response
Notification The operation can send a message but will not wait for a response


One-Way Operation

A one-way operation example:

<message name="newTermValues">
  <part name="term" type="xs:string"/>
  <part name="value" type="xs:string"/>
</message>

<portType name="glossaryTerms">
  <operation name="setTerm">
    <input name="newTerm" message="newTermValues"/>
  </operation>
</portType >

In the example above, the port "glossaryTerms" defines a one-way operation called "setTerm".

The "setTerm" operation allows input of new glossary terms messages using a "newTermValues" message with the input parameters "term" and "value". However, no output is defined for the operation.

Buy below a very good recommended book on how to Build Your Own Web Site The Right Way Using HTML & CSS:


Request-Response Operation

A request-response operation example:

<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 the example above, the port "glossaryTerms" defines a request-response operation called "getTerm".

The "getTerm" operation requires an input message called "getTermRequest" with a parameter called "term", and will return an output message called "getTermResponse" with a parameter called "value".

WSDL Bindings


WSDL bindings defines the message format and protocol details for a web service.


Binding to SOAP

A request-response operation example:

<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>

<binding type="glossaryTerms" name="b1">
   <soap:binding style="document"
   transport="http://schemas.xmlsoap.org/soap/http" />
   <operation>
     <soap:operation soapAction="http://example.com/getTerm"/>
     <input><soap:body use="literal"/></input>
     <output><soap:body use="literal"/></output>
  </operation>
</binding>

The binding element has two attributes - name and type.

The name attribute (you can use any name you want) defines the name of the binding, and the type attribute points to the port for the binding, in this case the "glossaryTerms" port.

The soap:binding element has two attributes - style and transport.

The style attribute can be "rpc" or "document". In this case we use document. The transport attribute defines the SOAP protocol to use. In this case we use HTTP.

The operation element defines each operation that the port exposes.

For each operation the corresponding SOAP action has to be defined. You must also specify how the input and output are encoded. In this case we use "literal".

You Have Learned WSDL, Now What?


WSDL Summary

This tutorial has taught you how to create WSDL documents that describes a web service. It also specifies the location of the service and the operations (or methods) the service exposes.

You have learned how to define the message format and protocol details for a web service.

You have also learned that you can register and search for web services with UDDI.


Now You Know WSDL, What's Next?

The next step is to learn about SOAP and Web Services.

SOAP

SOAP is a simple XML-based protocol that allows applications to exchange information over HTTP.

Or more simply: SOAP is a protocol for accessing a web service.

Web Services

Web services can convert your applications into web-applications.

By using XML,  messages can be sent between applications.



 

 

Top Items Not To Miss

 

3DCart Shopping Cart Software

Sell Online with 3dCart

 

Largest Registrar - GoDaddy.com

Quick Shopping CartŪ from GoDaddy.com! - 125 X 125

 

dotCanada.com

 

GlowHost Hosting

 

Buy/ Sell Websites at WebsiteBroker.com

Sell Your Website - WebsiteBroker.com

 

Yola

Make your business website stand out with Yola

 

DreamTemplate

DreamTemplate - Web Templates

 

NetworkSolutions.com

 

Web.com-Websites made simple

Web.com Site Builder

 

Webhostingpad

New Year's Web Hosting

 

Lunarpages.com

Get 3 Months FREE Windows Hosting

 

Register.com

Banner E

 

Dotster.com

 

shareasale.com

 

Quality backlinks!

 

Keyword Competitor

Keyword Competitor real-time keyword research and competitor monitoring tool

 

CoffeeCup Software

Click Here for CoffeeCup Website Design Software

 

1&1 Internet Ltd

Quick links

Yocto Guide

Yocto Store

Yocto Updates

Yocto Forum

Yocto Links

Contact Us

 

top ecommerce sites
only search yocto web development

Join Yocto Forum And Share Your Views And Comments On Any Web Development Topic With The World web dev