Example #1
0
function restore_configuration($id)
{
    // invoke webservice of restore ecu
    // Invoke Web Services
    $webServiceAddress = getWebServiceAddress();
    ini_set("soap.wsdl_cache_enabled", "0");
    $client = new SoapClient($webServiceAddress, array('encoding' => 'UTF-8'));
    try {
        $vin = getVIN();
        $param = array('arg0' => $vin, 'arg1' => $id);
        $ret = $client->restoreEcu($param);
        if ($ret->return == true) {
            return "<br/><font color='red'>Success to restore ECU {$id}</font><br />";
        } else {
            return "<br/><font color='red'>Error. Fail to restore ECU {$id}</font><br />";
        }
        //print_r($ret);
    } catch (SoapFault $exception) {
        print $exception;
    }
}