webservice/public/client-re.php
2010-08-30 07:49:44 +00:00

44 lines
1.2 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://soapserver.sd.dev/ws1?wsdl');
echo '<pre>';
print_r($client->getTypes());
print_r($client->getFunctions());
echo '</pre>';
// exit;
$taxe = $client->getTaxValue('TPS');
var_dump($taxe);
echo '<br/>';
echo 'REQUETE : '.htmlentities($client->getLastRequest());
echo '<br/>';
echo 'REPONSE : '.htmlentities($client->getLastResponse());
}
catch(Zend_Exception $e){
echo $e->getMessage();
}