Beispiel #1
0
function invoke_jdk_install_webservice()
{
    $webServiceAddress = getWebServiceAddress();
    echo "<br/><font color='green'>web service: {$webServiceAddress}</font><br />";
    //ini_set("soap.wsdl_cache_enabled", "1");
    $client = new SoapClient($webServiceAddress, array('encoding' => 'UTF-8'));
    try {
        $app_id = $_POST['id'];
        $vin = getVIN();
        print "vin: {$vin}; app_id: {$app_id}\r\n";
        $param = array('arg0' => $vin, 'arg1' => $app_id);
        echo "<br/><font color='green'>1</font><br />";
        $ret = $client->install4Jdk($param);
        echo "<br/><font color='green'>2</font><br />";
        return $ret;
    } catch (SoapFault $exception) {
        print $exception;
        return false;
    }
}
Beispiel #2
0
function ws_parseVehicleConfig($path)
{
    $webServiceAddress = getWebServiceAddress();
    //ini_set("soap.wsdl_cache_enabled", "1");
    $client = new SoapClient($webServiceAddress, array('encoding' => 'UTF-8'));
    try {
        $param = array('arg0' => $path);
        $ret = $client->parseVehicleConfiguration($param);
        // delete vehicle config file
        unlink($path);
        if ($ret->return == "true") {
            echo "<br/><font color='green'>Vehicle Configuration updated successfuflly</font><br />";
        } else {
            echo "<br/><font color='red'>" . $ret->return . "</font><br />";
        }
        return $ret;
    } catch (SoapFault $exception) {
        print $exception;
        return false;
    }
}
function publish_app_by_app_id($app_id)
{
    // Invoke Web Services
    $webServiceAddress = getWebServiceAddress();
    ini_set("soap.wsdl_cache_enabled", "0");
    $client = new SoapClient($webServiceAddress, array('encoding' => 'UTF-8'));
    try {
        $param = array('arg0' => $app_id);
        $ret = $client->publish($param);
        //print_r($ret);
        if ($ret == "true") {
            print "publish it successfully.";
        } else {
            print "Fail to publish";
        }
    } catch (SoapFault $exception) {
        print $exception;
    }
}