My guess is $HTTP_RAW_POST_DATA is unset; therefor you are sending ''
to your $server->service()
and ''
is not an existing function. Try debugging your $HTTP_RAW_POST_DATA.
Also you can debug client and server by adding:
// Display the request and response
echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
As from the page you have probably taken the extremely outdated example from.