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.

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 Conferencing and social media domain. The motive of creating cutehits was just to share the knowledge/solutions I get to know during my day to day life so that if possible I can help someone for same problems/solutions. CuteHits.com is a really a very effort for sharing knowledge to rest of the world. For any query/suggestion about same you can contact me on below details:- Email: shekharmca2005 at gmail.com Phone: +91-9560201363

Latest posts by Chandra Shekhar (see all)

You may also like...