Web Services

SOAP IN Web services

SOAP Tutorial

adplus-dvertising
WSDL (Web Services Description Language)
Previous Home Next

Introduction

  • WSDL is an XML based protocol and a language that UDDI uses.
  • WSDL developed jointly by Microsoft and IBM.
  • WSDL describes that what operations will performed when client accessing web service.
  • It exchanges the information in decentralized environment
  • It exchanges the information in distributed environment
  • It used as a combination with SOAP and XML Schema to provide web services over the Internet

Structure of the WSDL Document

<definitions>
 <types>
   definition of types........
 </types>
 <message>
   definition of a message....
 </message>
 <portType>
      <operation>
	definition of a operation..  
      </operation>
 </portType>
 <binding>
   definition of a binding....
 </binding>
 <service>
   definition of a service....
 </service>
</definitions>
WSDL Elements
Three major elements of WSDL that can be defined separately and they are:
  1. Types
  2. Operations
  3. Binding
Following are the elements of WSDL document:
  1. Definition
  2. <definition> element is define the name of web service, it is la root element for any web services. It declares the namespaces. It is like a container for the other elements of the document.

    <definitions name="ServiceName.."
       targetNamespace="..."
       xmlns=".."
       xmlns:soap="..."
       xmlns:tns="..."
       xmlns:xsd="...">
       ...........................
    </definitions>
    
  3. Types
  4. Every application needed to define its inputs and outputs in and out of there domain for that one element necessary to care of defining data types. In case of web services WSDL <types> element take responsibility to defining data types. The types are XML documents, or document parts. WSDL allowed the types to defined in separate elements in the document that provide benefit to use this types are with multiple Web services.

    <types>
      <schema targetNamespace=""
                xmlns="">
      <element name="Request">
          <complexType><all>
       <element name="request1" type="string"/>
        </all></complexType>
       </element>
      </schema>
    </types>
    
  5. Message
  6. Between the Web service providers and consumers the data being exchanged described by <message>element. Each Web Service has two messages:

    • Input, describe parameter of web services.
    • Output, describe return data of web services.
    <message name="sss">
          <part name="sss1" type=".."/>
       </message>
       <message name="rrr">
          <part name="ggg" type=""/>
    </message>
    

    For each parameter of the Web Service's function defined it may be  zero or for more <part>parameter. For all associates with a concrete type defined in the <types> container element.

  7. Port type
  8. The <portType> element combines multiple message elements and  mapped to multiple transports through various bindings. We can say that a it provide a complete one way or round-trip operation. A <portType> can combine one request and one response message into a single request/response operation. The <portType> element commonly used in SOAP services.

    <message name="sss">
          <part name="sss1" type=".."/>
       </message>
       <message name="rrr">
          <part name="ggg" type=""/>
    </message>
    
  9. Binding
  10. HTTP GET, HTTP POST, or SOAP and other transport make binding easily available. The <binding> element provide that how the portType operation transmitted over the network. It provide concrete information about the protocols that is used for the transaction. Binding also provide information that where service uploaded.

    <binding name="" type="">
    
  11. Port
  12. A <port> element defines an individual endpoint by specifying a single address for a binding. Port be the restricted to specify more than one address information. It must be binding the address information. The port element has two attributes

    1. The name attribute: It provide unique name among all port.
    2. The binding attribute: The binding attribute banded the linking rules that defined by the WSDL.
  13. Service
  14. The<service>element defined the ports and is a collection of port which supported by the Web service. There is only one port element for each protocol which supported the web services. It include the documentation element that provide the Human readable Documentation.

<service name="Name">
      <documentation>Hello</documentation>
      <port binding="" name="">
         <soap:address
            location="">
      </port>
</service>

In addition to these major elements, the WSDL specification also defines the following utility elements:

Documentation: This element is used to provide Human readable document

Import: Its import the WSDL document.

Previous Home Next