I am learning how to create Web Services and I am making two files in php, server and client. 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();
?>
Client.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();
}
?>
Running the client.php script gives the following error
Error fetching HTTP headers
I've already increased to the timeout for 600s, the way I saw it in StackOverFlow English, but only delayed the same response. Can someone help?