getError(); if ($err) { // Display the error echo '

Constructor error

' . $err . '
'; // At this point, you know the call that follows will fail } // Call the SOAP method $data = array('telefono' => '59395652784', 'servicio' => 30, 'identificador' => 0, 'adicional' => 'NA', 'via' => 'TES', 'cobrado' => 0); $result = $client->call('suscribe', array('SuscribeIN' => $data)); // Check for a fault if ($client->fault) { echo '

Fault

';
    print_r($result);
    echo '
'; } else { // Check for errors $err = $client->getError(); if ($err) { // Display the error echo '

Error

' . $err . '
'; } else { // Display the result echo '

Result

';
        print_r($result);
    echo '
'; } } // Display the request and response echo '

Request

'; echo '
' . htmlspecialchars($client->request, ENT_QUOTES) . '
'; echo '

Response

'; echo '
' . htmlspecialchars($client->response, ENT_QUOTES) . '
'; // Display the debug messages echo '

Debug

'; echo '
' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '
'; ?>