What Is WSDL

This section describes what is WSDL - an XML based standard designed to describes protocol bindings and message formats of Web services.

What Is WSDL? WSDL (Web Services Definition Language) is an XML based standard designed to describes protocol bindings and message formats of Web services. WSDL is often pronounced as "Whiz-Dull".

A WSDL document is an XML document written in WSDL to describe Web service. Here is a copy of the WSDL document for the demonstration Web service used in previous sections. You can download one yourself by going to http://herongyang.com/Service/Hello_WSDL_11_SOAP.wsdl with your Web browser:

<?xml version="1.0"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns:hy="https://www.herongyang.com/Service/"
  targetNamespace="https://www.herongyang.com/Service/">

  <wsdl:documentation>
    Hello_WSDL_11_SOAP.wsdl
    Copyright (c) 2009 HerongYang.com. All Rights Reserved.
    All rights reserved
  </wsdl:documentation>

  <wsdl:types>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      targetNamespace="https://www.herongyang.com/Service/">
      <xsd:element name="HelloRequest" type="xsd:string"/>
      <xsd:element name="HelloResponse" type="xsd:string"/>
    </xsd:schema>
  </wsdl:types>

  <wsdl:message name="helloInputMessage">
    <wsdl:part name="helloInputPart" element="hy:HelloRequest"/>
  </wsdl:message>
  <wsdl:message name="helloOutputMessage">
    <wsdl:part name="helloOutputPart" element="hy:HelloResponse"/>
  </wsdl:message>

  <wsdl:portType name="helloPortType">
    <wsdl:operation name="Hello">
      <wsdl:input name="helloInput"
        message="hy:helloInputMessage"/>
      <wsdl:output name="helloOutput"
        message="hy:helloOutputMessage"/>
    </wsdl:operation>
  </wsdl:portType>

  <wsdl:binding name="helloBinding" type="hy:helloPortType">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="Hello">
      <soap:operation
        soapAction="https://www.herongyang.com/Service/Hello"/>
      <wsdl:input name="helloInput">
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="helloOutput">
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="helloService">
    <wsdl:port name="helloPort" binding="hy:helloBinding">
      <soap:address
location="https://www.herongyang.com/Service/Hello_SOAP_11.php"/>
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>

I cannot read this document well before learning the WSDL specifications. But it seems to be describing precisely how this Web service should be used. See my other book: "SOAP Web Service Tutorials - Herong's Tutorial Examples" for more information on SOAP and WSDL.

Table of Contents

 About This Book

 Introduction and Installation of PHP

 Managing PHP Engine and Modules on macOS

 Managing PHP Engine and Modules on CentOS

 MySQLi Module - Accessing MySQL Server

 DOM Module - Parsing HTML Documents

 GD Module - Manipulating Images and Pictures

 Zip Module - Managing ZIP Archive Files

SOAP Module - Creating and Calling Web Services

 SOAP Module and PHP Implementations of SOAP

 Turning on the Default SOAP Module

 Hello_There.php - First Example of SOAP

 SoapClient - SOAP Client Class and Functions

 Hello_There_Dump.php - Debugging SOAP Messages

What Is WSDL

 Using SOAP Extension in non-WSDL Mode

 SOAP Module - Server Functions and Examples

 References

 Full Version in PDF/EPUB