Skip to content
Snippets Groups Projects
Commit 5f3a311a authored by Florian Azizian's avatar Florian Azizian
Browse files

start remoteSignatoryBooks

parent b48afe7e
No related branches found
No related tags found
No related merge requests found
...@@ -15,27 +15,40 @@ ...@@ -15,27 +15,40 @@
class IxbusController class IxbusController
{ {
public static function getInitializeDatas() public static function getModal(array $config)
{
$initializeDatas = IxbusController::getInitializeDatas($config);
$html ='<div align="center">';
$html .='<input type="button" name="cancel" id="cancel" class="button" value="valider"/>';
$html .='<input type="button" name="cancel" id="cancel" class="button" value="annuler"/>';
$html .='</div>';
return $html;
}
public static function createSession($config)
{ {
$xmlPostString = '<?xml version="1.0" encoding="utf-8"?> $xmlPostString = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body> <soap:Body>
<getUtilisateur xmlns="http://www.srci.fr"> <CreateSession xmlns="http://www.srci.fr">
<NomUtilisateur>toto</NomUtilisateur> <NomUtilisateur>'.$config['data']['userId'].'</NomUtilisateur>
<MotdePasse>tata</MotdePasse> <MotdePasse>'.$config['data']['password'].'</MotdePasse>
</getUtilisateur> <OrganisationID>'.$config['data']['organizationId'].'</OrganisationID>
</soap:Body> </CreateSession>
</soap:Envelope>'; </soap:Body>
</soap:Envelope>';
$opts = [ $opts = [
CURLOPT_URL => 'http://parapheur.orleans.fr/ixbuswebws/Utilisateur.asmx', CURLOPT_URL => 'http://parapheur.orleans.fr/parapheurws/service.asmx',
CURLOPT_HTTPHEADER => [ CURLOPT_HTTPHEADER => [
'content-type:text/xml;charset=\"utf-8\"', 'content-type:text/xml;charset=\"utf-8\"',
'accept:text/xml', 'accept:text/xml',
"Cache-Control: no-cache", "Cache-Control: no-cache",
"Pragma: no-cache", "Pragma: no-cache",
"Content-length: ".strlen($xmlPostString), "Content-length: ".strlen($xmlPostString),
"SOAPAction: \"http://www.srci.fr/getUtilisateur\"" "SOAPAction: \"http://www.srci.fr/CreateSession\""
], ],
CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true, CURLOPT_POST => true,
...@@ -49,15 +62,80 @@ class IxbusController ...@@ -49,15 +62,80 @@ class IxbusController
return $rawResponse; return $rawResponse;
} }
public static function getModal(array $config) public static function getInitializeDatas($config)
{ {
$initializeDatas = IxbusController::getInitializeDatas(); $sessionId = IxbusController::createSession($config);
$rawResponse['natures'] = IxbusController::getNature(['config' => $config, 'sessionId' => $sessionId]);
$rawResponse['usersList'] = IxbusController::getUsersList(['config' => $config, 'sessionId' => $sessionId]);
$html ='<div align="center">'; return $rawResponse;
$html .='<input type="button" name="cancel" id="cancel" class="button" value="valider"/>'; }
$html .='<input type="button" name="cancel" id="cancel" class="button" value="annuler"/>';
$html .='</div>';
return $html; public static function getNature($aArgs)
{
$xmlPostString = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetNaturesAvecDroitsCreer xmlns="http://www.srci.fr">
<organisationID>'.$aArgs['config']['data']['organizationId'].'</organisationID>
</GetNaturesAvecDroitsCreer>
</soap:Body>
</soap:Envelope>';
$opts = [
CURLOPT_URL => 'http://parapheur.orleans.fr/parapheurws/service.asmx',
CURLOPT_HTTPHEADER => [
'content-type:text/xml;charset=\"utf-8\"',
'accept:text/xml',
"Cache-Control: no-cache",
"Pragma: no-cache",
"Content-length: ".strlen($xmlPostString),
"Cookie:".$aArgs['sessionId'],
"SOAPAction: \"http://www.srci.fr/GetNaturesAvecDroitsCreer\""
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $xmlPostString
];
$curl = curl_init();
curl_setopt_array($curl, $opts);
$rawResponse = curl_exec($curl);
return $rawResponse;
}
public static function getUsersList($aArgs)
{
$xmlPostString = '<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetListeUtilisateursDroitCreer xmlns="http://www.srci.fr">
<organisationID>'.$aArgs['config']['data']['organizationId'].'</organisationID>
</GetListeUtilisateursDroitCreer>
</soap:Body>
</soap:Envelope>';
$opts = [
CURLOPT_URL => 'http://parapheur.orleans.fr/parapheurws/service.asmx',
CURLOPT_HTTPHEADER => [
'content-type:text/xml;charset=\"utf-8\"',
'accept:text/xml',
"Cache-Control: no-cache",
"Pragma: no-cache",
"Content-length: ".strlen($xmlPostString),
"Cookie:".$aArgs['sessionId'],
"SOAPAction: \"http://www.srci.fr/GetListeUtilisateursDroitCreer\""
],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $xmlPostString
];
$curl = curl_init();
curl_setopt_array($curl, $opts);
$rawResponse = curl_exec($curl);
return $rawResponse;
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment