getError(); if ($err) { // Display the error echo '
' . $err . ''; // At this point, you know the call that follows will fail } // Call the SOAP method $result = $client->call('hello', array('name' => 'Scott')); // Check for a fault if ($client->fault) { echo '
';
print_r($result);
echo '';
} else {
// Check for errors
$err = $client->getError();
if ($err) {
// Display the error
echo '' . $err . ''; } else { // Display the result echo '
';
print_r($result);
echo '';
}
}
// Display the request and response
echo '' . htmlspecialchars($client->request, ENT_QUOTES) . ''; echo '
' . htmlspecialchars($client->response, ENT_QUOTES) . ''; // Display the debug messages echo '
' . htmlspecialchars($client->debug_str, ENT_QUOTES) . ''; ?>