it:ad:wsdl:home

IT:AD:WSDL

Web Services Description Language (WSDL) is an XML grammar for publishing descriptions of Services as collections of endpoints for exchanging messages.

A WSDL doc is an xml/ file with an *.wsdl extension, made up of the following;

  • Ports (:= Class)
  • Operation (:= Function)
  • Messages (:= Parameters)
  • Types (:= Parameter Types)
  • Binding (⇒ Protocol and Message format)

Note: A *.wsdl differs from a *.disco which is a MS mechanism for publishing specifications of WebServices/, which is an older/retired technology.

An example oa WSLD 1.2 file’s contents:

<wsdl:definitions name="nmtoken"? targetNamespace="uri"> 
  <!--A WSDL can import TODO -->
  <import namespace="uri" location="uri"/> *
  <wsdl:documentation .... /> ?




  <!-- For maximum platform neutrality, WSDL uses XML Schema -->
  <wsdl:types> ?
    <wsdl:documentation .... /> ?
    <xsd:schema .... /> *
  </wsdl:types>



  <!--Message (:=ArgPkg) used by an Operation (:=Method) within a Port (:=Class)-->
  <!-- Message (:=ArgPkg) can contain one or more part (:=Arguments)  -->
  <message name="setUserPrefRequest">
    <wsdl:documentation .... /> ?
    <part name="key" type="xs:string"/>
    <part name="value" type="xs:string"/>
  </message>

  <!--Message (:=ArgPkg) used by an Operation (:=Method) within a Port (:=Class)-->
  <message name="getUserPrefRequest">
    <wsdl:documentation .... /> ?
    <part name="key" type="xs:string"/>
  </message>





  <!-- Port (:=Class) containing Operations (:=Methods)-->
  <portType name="userPrefs">
    <wsdl:documentation .... /> ?
    <operation name=”setUserPref”>
      <wsdl:documentation .... /> ?
      <input message=”setUserPrefRequest”/>
    </operation>
  
    <operation name="getUserPref">
       <wsdl:documentation .... /> ?
       <input message="setUserPrefRequest"/>
       <output message="setUserPrefResponse"/>
    </operation>
  </portType>



  <!-- Binding name ties to portType name -->
  <binding name="myBinding" type="userPrefs" >
    <!-- binding [rpc|document], transport (:=transport protocol) [http] -->
    <!-- So here we’re saying that the doc has to use SOAP HTTP -->
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <!-- Have to map each operation exposed...never userstood why the repetition! -->
    <operation>
      <soap:operation soapAction="http://mysite.com/setUserPref"/>
        <input><soap:body use="literal"/></input>
        <output><soap:body use="literal"/></output>
      </operation>
   
      <operation>
        <soap:operation soapAction="http://mysite.com/getUserPref"/>
        <input><soap:body use="literal"/></input>
      </operation>
  </binding>

  <!-- TODO -->
  <wsdl:service name="ncname" serviceType="qname"> *
    <wsdl:documentation .... /> ?
    <wsdl:port name="ncname" binding="qname"> *
      <wsdl:documentation .... /> ?
        <-- address details -->
        </wsdl:port>
    </wsdl:service>
  </wsdl:definitions>

  • /home/skysigal/public_html/data/pages/it/ad/wsdl/home.txt
  • Last modified: 2023/11/04 22:39
  • by 127.0.0.1