Estou aprendendo a criar Web Services e estou fazendo dois arquivos em php, server e cliente. Server.php
<?php
class functions
{
function mensagem()
{
return 'hello server';
}
function soma($a, $b)
{
return $a + $b;
}
}
$options = array('uri' => 'http://127.0.0.1/teste/index.php');
$server = new soapServer(null, $options);
$server->setClass('functions');
$server->handle();
?>
Cliente.php
<?php
$options = array('location' => 'http://127.0.0.1/teste/cliente.php',
'uri' => '127.0.0.1/teste/index.php');
$cliente = new soapClient(null, $options);
try{
print($cliente->soma(2, 3));
} catch(Exception $e)
{
print $e->getMessage();
}
?>
Ao executar o script cliente.php da o seguinte erro
Error fetching HTTP headers
Já aumentei até o timeout para 600s, da forma como vi no StackOverFlow ingles, mas só deixou mas demorada a mesma resposta. Alguem Pode dar uma ajuda?