Source

Web Services Tutorial Code / public / soap / soap-demo.php

Full commit
<?php

$options = array('uri' => 'http://myapi.local',
    'trace' => 1,
    'location' => 'http://myapi.local/soap/');

try{
$client = new SoapClient(NULL, $options);

    $response = $client->eightBall();
    echo $response;

} catch (SoapFault $e) {
    echo "ERROR: " . $e->getMessage();
}