getError(); if ($err) { // Display the error echo '
' . $err . ''; // At this point, you know the call that follows will fail } // Call the SOAP method $data = array('telefono' => '59395652784', 'servicio' => 30); $result = $client->call('unsuscribe', array('UnsuscribeIN' => $data)); // 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) . ''; ?>