R4R Team working to provide free of cost for experienced and freshers

Tutorials | Examples|Interview Questions and Answers|Java Tutorials| C Tutorials | C++ Tutorials | Spring Tutorials| Hibernate Tutorials | JSP Tutorials | Servelets Tutorials| C# Tutorials | PHP Tutorials etc , Basics | Download Software | Data Types | Variables | Constant | Storage & Classes | Operators | Decisions Making | Loops | Functions| Numbers | Arrays | Pointers | String | Datastructure | Expressions | Preprocessor Statement | I/O | Exception Handling | OOPs Tutorial | Classes and object |C++ Inheritance Overloading | Polymorphism | Abstraction | Encapsulation | Interfaces | Multithreading etc

Web Services

SOAP IN Web services

SOAP Tutorial

Elements of WSDL In WebServices
Previous Home Next

WSDL is extensible that allow description of endpoints and their messages regardless of what the message formats is. Following are the elements of Web Service Description Language:

Message: The XML based definition in WSDL consists of message. It is an abstract definition of the data.


   <message name="HelloRequest">
      <part name="name" type="xsd:string"/>
   <message name="HelloResponse">
      <part name="john" type="xsd:string"/>

Binding: This element defines port type. It is also called a data format for definning the messages. This element describes how the web service is accessed over the network.


<definitions .... >
    <binding name="booktoken" type="book-name"> 
        <operation name="booktoken"> 
           <input name="booktoken"? > 
           <output name="booktoken"? >  
           <fault name="booktoken">

PortType: A set of operations supported by one or more endpoints.For example collections of operations for binding element or binding message, such as naming a method, message business process. These collections of operations are called as Interfaces.


<portType name="WebServiceInterface">
      <operation name="Add">
         <input message="y:AddOperation"/>
         <output message="y:ResponseOperation"/>
      <operation name="Multiply">
         <input message="y:MultiplyOperation"/>
         <output message="y:ResponseOperation"/>

Types: The types element contains data types that exchanged data between the client and the web service.


        xmlns:xs=        "http://www.indo.org/XMLSchema"
        targetNamespace= "http://go.com/ServicePage/schema"
        xmlns=           "http://go.com/ServicePage/schema">
		<xs:element name="Request"
          <xs:element  name="date" type="xs:date"/>
	  <xs:element name="Response" type="xs:string"/>
	  <xs:element name="DateError" type="xs:string"/>

Service: The service element contains a URL to the service. For example http://www.go.com/Hello/.


 xmlns:sch = "http://go.com/ServicePage/schema"
 targetNamespace= "http://go.com/ServicePage"
  xmlns:ns="http://example.org/origin/" >
  <service name="CoreJavaService">
       <port name="CoreJavaEndpoint" binding="y:CoreJavaSoapHttpBinding">
         <soap:address location="http://localhost/r4r.co.in"/>
Previous Home Next