Friday, June 8, 2018

WSDL - Web Service Description Language




WSDL


  • What is WSDL (Web Service Definition Language)?
  • What are the different parts of a WSDL?

  • Basic Structure of WSDL
Basic Structure Of WSDL
=======================

<wsdl:definitions> - The root element
<wsdl:types> - Defines XML Elements or Xml Types
<wsdl:message> - Input message, Output message, Fault message
<wsdl:portType> - Mapped with Endpoint Interface (i.e., Business Interface)
<wsdl:operation> - Mapped with method name in above Endpoint Interface
<wsdl:input/> - Refers above Input message
<wsdl:output/> - Refers above Output message
<wsdl:fault> - Refers above Fault message
</wsdl:operation>
...
</wsdl:portType>
<wsdl:binding> - Message Format, Messaging Style, Encoding Style, Transport protocol details
<wsdl:service> - Mapped with Service Interface
</wsdl:definitions>


Basic structure of <wsdl:binding>
=================================
<wsdl:binding>
<soap:binding style="doc | rpc"/>
<wsdl:operation>
<soap:operation style="doc | rpc"/>
<wsdl:input>
<soap:body/>
</wsdl:input>
<wsdl:output>
<soap:body/>
</wsdl:output>
<wsdl:fault>
<soap:fault/>
</wsdl:fault>
</wsdl:operation>
...
</wsdl:binding>


             rpc                document
   ===           ========
<soap:body Yes use="encoded | literal" Yes
   No encodingStyle="soap encoding url"          No
   Yes namespace="targetnamespace" No
   Yes parts="s1 s2" />          No


  • The <soap:bidning/>, 
    • <soap:operation/>, 
    • <soap:body/> and 
    • <soap:fault/> are protocol specific elements.
  • The <wsdl:binding>, 
    • <wsdl:operation>, 
    • <wsdl:input>, 
    • <wsdl:output> and 
    • <wsdl:fault> are wsdl elements.




  • WSDL:Definitions
  • WSDL:Types
  • WSDL:message
  • wsdl:portType
  • wsdl:binding
  • wsdl:service
  • Document  VS RPC
Upload images  here from  page number  241 and 240.




  • What is Contract First Approach
        • We define a contract first!
    • With Spring Web Services, we define an XSD first



  • What is an XSD?
  • Can you give an example of an XSD?


  • Service Definition specifying
    Format of Request
    Format of Response
    Request/Response Structure
    Transport used
    Endpoint details

    No comments:

    Post a Comment

    Hyderabad Trip - Best Places to visit

     Best Places to Visit  in Hyderabad 1.        1. Golconda Fort Maps Link :   https://www.google.com/maps/dir/Aparna+Serene+Park,+Masj...