$value) {
$array[$key] = $value;
}
}
else {
$array = $object;
}
return $array['out'];
}
$options = array(
'compression'=>true,
'exceptions'=>false,
'trace'=>true
);
$soap = new SoapClient($wsdl, $options);
?>
getIdp(array( 'in0' => $these, 'in1' => $proprietaire ));
$Idp = object2array($Idp);
//on recupère la fiche XML
$XML = $soap->getXMLForms(array( 'in0' => $Idp));
$XML = object2array($XML);
//on écrit le fichier
$importXML = fopen('/tmp/fiche.xml', "w");
fwrite($importXML, $XML);
//On ferme le fichier
fclose($importXML);
//modification de l attribut lang
exec('xsltproc '.$repertoireXSL.' /tmp/fiche.xml > /tmp/final.xml');
//depublie
$depub = $soap->performAction(array( 'in0' => $Idp, 'in1' => '5', 'in2' => 'correction via XSL des theses sur travaux'));
//on lit le fichier TEF
$file = fopen('/tmp/final.xml', "r");
$ficheImport = '';
//Tant que l'on est pas à la fin du fichier
while (!feof($file))
{
//On lit la ligne courante
$ficheImport .= fgets($file);
}
//On ferme le fichier
fclose($file);
$Xml = $soap->saveXml(array( 'in0' => $Idp, 'in1' => $ficheImport));
//publie
$depub = $soap->performAction(array( 'in0' => $Idp, 'in1' => '2', 'in2' => 'correction via XSL des theses sur travaux'));
exec('rm /tmp/fiche.xml && rm /tmp/final.xml');
}
?>