64 lines
1.5 KiB
PHP
64 lines
1.5 KiB
PHP
<?php
|
|
ini_set("soap.wsdl_cache_enabled", "0");
|
|
// Define path to application directory
|
|
defined('APPLICATION_PATH')
|
|
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
|
|
|
|
// Define application environment
|
|
defined('APPLICATION_ENV')
|
|
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
|
|
|
|
// Ensure library/ is on include_path
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
realpath(APPLICATION_PATH . '/../library'),
|
|
get_include_path(),
|
|
)));
|
|
|
|
/** Zend_Application */
|
|
require_once 'Zend/Application.php';
|
|
|
|
// Create application, bootstrap, and run
|
|
$application = new Zend_Application(
|
|
APPLICATION_ENV,
|
|
APPLICATION_PATH . '/configs/application.ini'
|
|
);
|
|
|
|
require_once('Zend/Soap/Client.php');
|
|
|
|
try {
|
|
|
|
$client = new Zend_Soap_Client(
|
|
'http://scoresws.sd.dev/service?wsdl-auto',
|
|
array(
|
|
'login' => 'mricois',
|
|
'password' => md5('mricois|bj10sx')
|
|
)
|
|
);
|
|
|
|
/*
|
|
echo '<pre>';
|
|
print_r($client->getTypes());
|
|
print_r($client->getFunctions());
|
|
echo '</pre>';
|
|
exit;
|
|
*/
|
|
|
|
$parameters = new stdClass();
|
|
$parameters->siret = '552144503';
|
|
$parameters->id = 0;
|
|
$parameters->forceVerif = false;
|
|
$result = $client->getIdentite($parameters);
|
|
|
|
var_dump($result);
|
|
echo '<br/>';
|
|
echo 'REQUETE : '.htmlentities($client->getLastRequest(), ENT_COMPAT, 'UTF-8');
|
|
echo '<br/>';
|
|
echo 'REPONSE : '.htmlentities($client->getLastResponse(), ENT_COMPAT, 'UTF-8');
|
|
echo '<br/>';
|
|
exit;
|
|
|
|
}
|
|
catch(Zend_Exception $e){
|
|
echo $e->getMessage();
|
|
}
|