<?php
class SOAP_Example_Server {
    function 
echoString($inputString)
    {
        return 
$inputString;
    }
}

$server = new SoapServer("urn:SOAP_Example_Server");
$server->setClass("SOAP_Example_Server");
$server->handle();
?>
Client for Example Server

<?
$example = SoapObject(
    'http://localhost/SOAP/example/exampleserver.php');
         
$response = $example->echoString('This is a test!');
?>