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

GCP Architect
Chandra Shekhar Pandey is Google certified Cloud engineer, I am Magento2 Trained developer. Having huge experience in designing cloud solution. I have around 12 years of experience with world enterprise IT companies and fortune 500 clients. During my architecture design I am always caring about high availability, fast performance and resilient system. From the programmer background I have huge experience in LAMP stack as well. Throughout my carrier I have worked on Retail, E-Learning, Video... Read More about Chandra Shekhar

Latest posts by Chandra Shekhar (see all)