WSDL Tutorials - Herong's Tutorial Examples - Version 2.10, by Dr. Herong Yang
Testing SOAP Extension with WSDL 1.1
This section provides a tutorial example on how to configure and test SOAP Extension with a WSDL 1.1 document with my Hello Web service.
Once PHP is installed, I need to turn on the SOAP Extension with these steps:
1. If \local\php\php.ini does not exist, create it by copying the file \local\php.ini-production.
2. Edit \local\php\php.ini to set these configuration settings:
... extension_dir = "C:\local\php\ext" ... extension=php_soap.dll ...
3. Creating a testing PHP program, SOAP_Hello.php:
<?php # SOAP_Hello.php # Copyright (c) 2009 HerongYang.com, All Rights Reserved. # $client = new SoapClient( "http://www.herongyang.com/Service/Hello_WSDL_11_SOAP.wsdl"); echo $client->Hello("Hello from client."); ?>
4. Run the test program:
C:\herong\>\local\php\php SOAP_Hello.php Hello from server - herongyang.com.
This is super cool! You can call a Web service in two lines with PHP SOAP Extension.
Last update: 2009.
Table of Contents