Exemplo n.º 1
0
$log->writeLogFile("SENT:", 1);
$log->writeLogFile($post_data, 0);
//File da scrivere!!!!
$file_forwarded_written = writeTmpFiles($post_data, $idfile . "-forwarded.xml", true);
$size_doc = filesize($file_forwarded_written);
## 4- SPEDISCO IL MESSAGGIO AL REGISTRY E RICAVO LA RESPONSE
#### CREO IL CLIENT PER LA CONNESSIONE HTTP CON IL REGISTRY
if ($reg_http == "NORMAL") {
    writeTimeFile($idfile . "--Repository: Sono in connect NORMAL");
    include "./http_connections/http_client.php";
    $client = new HTTP_Client($reg_host, $reg_port, 30);
} else {
    if ($reg_http == "TLS") {
        include "./http_connections/ssl_connect.php";
        writeTimeFile($idfile . "--Repository: Sono in connect TLS");
        $client = new HTTP_Client_ssl($reg_host, $reg_port, 30);
        $client->set_protocol($tls_protocol);
    }
}
### SETTAGGI COMUNI
writeTimeFile($idfile . "--Repository: La dimensione e " . filesize($file_forwarded_written));
//Per http_client
$client->set_post_data($post_data);
$client->set_data_length(filesize($file_forwarded_written));
$client->set_path($reg_path);
$client->set_idfile($idfile);
$client->set_save_files($save_files);
$client->set_action("urn:ihe:iti:2007:RegisterDocumentSet-b");
$client->set_tmp_path($tmp_path);
#### SETTAGGI DEL TLS
######## INOLTRO AL REGISTRY E ATTENDO LA RISPOSTA ##########
Exemplo n.º 2
0
$log->writeLogFile("SENT:", 1);
$log->writeLogFile($post_data, 0);
//File da scrivere!!!!
$file_forwarded_written = writeTmpFiles($post_data, $idfile . "-forwarded.xml", true);
## 4- SPEDISCO IL MESSAGGIO AL REGISTRY E RICAVO LA RESPONSE
writeTimeFile($idfile . "--Repository: registry protocol {$reg_http}");
#### CREO IL CLIENT PER LA CONNESSIONE HTTP CON IL REGISTRY
if ($reg_http == "NORMAL") {
    writeTimeFile($idfile . "--Repository: Sono in connect NORMAL");
    include "./http_connections/http_client.php";
    $client = new HTTP_Client($reg_host, $reg_port, 30);
} else {
    if ($reg_http == "TLS") {
        include "./http_connections/ssl_connect.php";
        writeTimeFile($idfile . "--Repository: Sono in connect TLS");
        $client = new HTTP_Client_ssl($reg_host, $reg_port, 30);
        $client->set_protocol($tls_protocol);
    }
}
### SETTAGGI COMUNI
$client->set_post_data($post_data);
writeTimeFile($idfile . "--Repository: La dimensione è " . filesize($file_forwarded_written));
$client->set_data_length(filesize($file_forwarded_written));
$client->set_path($reg_path);
$client->set_idfile($idfile);
$client->set_save_files($save_files);
$client->set_tmp_path($tmp_path);
######## INOLTRO AL REGISTRY E ATTENDO LA RISPOSTA ##########
writeTimeFile($idfile . "--Repository: Inoltro al registry e attendo la risposta");
$registry_response_arr = $client->send_request();
#$headers_da_registry = apache_request_headers();