Turning on the Default SOAP Module

This section provides a tutorial example on how to turn on the SOAP extension inluded in the default distribution package - extension=php_soap.dll in the php.ini file.

The PHP distribution package comes with a default SOAP extension library. But it is not turned on automatically. I did the following test to see if SOAP turned on or not with the phpinfo() function:

herong> type PhpInfo.php
   <?php phpinfo();?>

herong> php PhpInfo.php > PhpInfo.txt

herong> find /i "soap" PhpInfo.txt
---------- PHPINFO.TXT

herong> php -v
PHP 7.3.0 (cli) (built: Dec  6 2018 01:54:19) ( ZTS MSVC15 ...
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies

So SOAP function is not available in my default installation, which is PHP 7.3.0 by The PHP Group.

The next thing I did is to to turn on the SOAP extension by editing \php\php.ini and update the following lines:

; Directory in which the loadable extensions (modules) reside.
extension_dir = "ext"
...

# PHP 7
extension=soap

# PHP 5
extension=php_soap.dll

I checked again:

herong> php PhpInfo.php > PhpInfo.txt

herong> find /i "soap" PhpInfo.txt

---------- PHPINFO.TXT
soap
Soap Client => enabled
Soap Server => enabled
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

Cool. Some settings related to SOAP showed up now.

To check who developed this implementation, I right-mouse clicked on the file \php\ext\php_soap.dll, and selected Properties. The pop up window told me this:

Internal Name: php_soap.dll
File Version: 7.3.0
Copyright (c) 1997-2018 The PHP Group

I then browsed the installed documentation at \php\html\intro.soap.html, and got the following information:

SOAP Functions

Introduction

The SOAP extension can be used to write SOAP Servers and Clients. It supports subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications.

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