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.
-
-
Chandra Shekhar
Latest posts by Chandra Shekhar (see all)
- Best practices for micro service design - January 23, 2022
- Spring Boot - January 23, 2022
- Java - January 23, 2022
Recent Comments