PHP Tutorials - Herong's Tutorial Examples
Dr. Herong Yang, Version 3.10

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://www.xmethods.net/sd/2001/DemoTemperatureService.wsdl with your Web browser:

<?xml version="1.0"?>
<definitions name="TemperatureService" 
 targetNamespace="http://www.xmethods.net/sd/TemperatureService.wsdl"
 xmlns:tns="http://www.xmethods.net/sd/TemperatureService.wsdl"   
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
 xmlns="http://schemas.xmlsoap.org/wsdl/">
 <message name="getTempRequest">
  <part name="zipcode" type="xsd:string"/>
 </message>
 <message name="getTempResponse">
  <part name="return" type="xsd:float"/>
 </message>
 <portType name="TemperaturePortType">
  <operation name="getTemp">
   <input message="tns:getTempRequest"/>
   <output message="tns:getTempResponse"/>
  </operation>
 </portType>
 <binding name="TemperatureBinding" type="tns:TemperaturePortType">
  <soap:binding style="rpc"
   transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="getTemp">
   <soap:operation soapAction=""/>
   <input>
    <soap:body use="encoded"
     namespace="urn:xmethods-Temperature-Demo"
     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   </input>
   <output>
    <soap:body use="encoded"
     namespace="urn:xmethods-Temperature-Demo"
     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
   </output>
  </operation>
 </binding>
 <service name="TemperatureService">
  <documentation>Returns current temperature in a given U.S. zipcode
  </documentation>
  <port name="TemperaturePort" binding="tns:TemperatureBinding">
   <soap:address
  location="http://services.xmethods.net:80/soap/servlet/rpcrouter"/>
  </port>
 </service>
</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: "Herong's Tutorial Notes on Web Service and SOAP" for more information on SOAP and WSDL.

Last update: 2005.

Table of Contents

 About This PHP Tutorial Book

 Introduction and Installation of PHP 5.4.3

 PHP Script File Syntax

 PHP Data Types and Data Literals

 Variables, References, and Constants

 Expressions, Operations and Type Conversions

 Conditional Statements - "if" and "switch"

 Loop Statements - "while", "for", and "do ... while"

 Function Declaration, Arguments, and Return Values

 Arrays - Ordered Maps

 Configuring and Sending out Emails

 Retrieving Information from HTTP Requests

 Creating and Managing Sessions in PHP Scripts

 Sending and Receiving Cookies in PHP Scripts

 Controlling HTTP Response Header Lines in PHP Scripts

 MySQL Server Connection and Access Functions

 Functions to Manage Directories, Files and Images

SOAP Extension Function and Calling Web Services

 PHP Implementations of SOAP

 Turning on the Default SOAP Extension

 Get_Temperature.php - First Example of SOAP

 SoapClient - SOAP Client Class and Functions

 Get_Temperature_Dump.php - Dumping Debugging Information

What Is WSDL?

 Using SOAP Extension in non-WSDL Mode

 SOAP Server Functions and Examples

 Localization Overview of Web Applications

 Using Non-ASCII Characters in HTML Documents

 Using Non-ASCII Characters as PHP Script String Literals

 Receiving Non-ASCII Characters from Input Forms

 "mbstring" Extension and Non-ASCII Encoding Management

 Managing Non-ASCII Character Strings with MySQL Servers

 Outdated Tutorials

 References

 PDF Printing Version

Dr. Herong Yang, updated in 2012
What Is WSDL?