WSDL Document Structure
  • A WSDL document uses elements to describe the web services. The root element of a WSDL document is definitions.
  • The syntax for the definitions element is:

<definitions name=”definitionName” targetNamespace="NamespaceURI">

where definitionName is the name of the WSDL document and NamespaceURI is the value for the targetNamespace attribute. The targetNamespace attribute specifies the namespace for the names declared within the definitions element. The default namespace is http://www.w3.org/2006/01/wsdl.

In the code example, SchoolLibrary is the name of the WSDL document and http://www.school.com/Library.wsdl is the namespace.

<definitions name=”SchoolLibrary”
targetNamespace="http://www.school.com/Library.wsdl">
<xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <message>
    ...
  </message>

  <interface>
    ...
  </interface>

  <service>
    ...
  </service>

  <binding>
    ...
  </binding>

</definitions>

Click the Next button to continue.