Basic Document Structure of WSDL and their example

 
  • Basic Document Structure of WSDL and their example are below
  • Message– Its a message that let human and machine provides explanatory details about web service .In other words its an information about data communication over web service call. With below code it let us know the detail of “getPosts” function about their request and response type.

<wsdl:message name="getPostsRequest">
<wsdl:part name="catId" type="xsd:int"/>
</wsdl:message>
<wsdl:message name="getPostsResponse">
<wsdl:part name="getPostsReturn" type="xsd:string"/>
</wsdl:message>
  • Operation– This provides abstract description of an action which is supported by the web service. Below code snippet let us know their Parmiter name that is CatId for the proceducre name getPosts. Its a concrete description about the procedure their request response and their parameter

    <wsdl:operation name="getPosts" parameterOrder="catId">
    <wsdl:input name="getPostsRequest" message="impl:getPostsRequest"/>
    <wsdl:output name="getPostsResponse" message="impl:getPostsResponse"/>
    </wsdl:operation>
    
  • Port Type–It identifies the type of data i.e., its all about a new data type created for specific purpose. Below code snippet expain how we create a port Type for a procedure.

    <wsdl:portType name="MYOwnPortType">
    <wsdl:operation name="getPosts" parameterOrder="catId">
    <wsdl:input name="getPostsRequest" message="impl:getPostsRequest"/>
    <wsdl:output name="getPostsResponse" message="impl:getPostsResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    
  • Binding– Its basically a complete protocal (set of rules) and data format specification for a particular port type.

    <wsdl:service name="NewWebService">
    <wsdl:port name="MyOwnHttpSoapEndpoint" binding="impl:NewSoapBinding">
    <wsdlsoap:address location="http://abc.com/index.php?/wpws"/>
    </wsdl:port>
    </wsdl:service>
    
    • Port– Its final destination where you are sending the request to get your response

      <wsdl:service name="NewWebService">
      <wsdl:port name="MyOwnHttpSoapEndpoint" binding="impl:NewSoapBinding">
      <wsdlsoap:address location="http://abc.com/index.php?/wpws"/>
      </wsdl:port>
      </wsdl:service>
      
      • Service– a collection of related functions.

Related posts:

The following two tabs change content below.

Chandra Shekhar

Consultant at Infogain
Chandra Shekhar is a LAMP Developer,Thinker,Blogger and currently working as Magento(Ecommerce) specialist.. I am always open to learn new things in LAMP as well as other newer technology. In the journey of my last 9 years of web and product development, I have decided to share my knowledge and experience to Open Source Community in 2011. In this regard I have started CuteHits.com. Since then I am actively sharing my knowledge on various LAMP technology through CuteHits.com’s technical ... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)