Fix gestion http et https pour les endpoint dans le WSDL
This commit is contained in:
parent
75d55a72cd
commit
d75d919229
@ -102,8 +102,9 @@ class ServiceController extends Zend_Controller_Action
|
|||||||
require_once $pathServiceClassPhp;
|
require_once $pathServiceClassPhp;
|
||||||
|
|
||||||
// --- Get hostname - add compatibility with Reverse Proxy
|
// --- Get hostname - add compatibility with Reverse Proxy
|
||||||
$hostName = $this->getRequest()->getHttpHost();
|
$hostName = $request->getHttpHost();
|
||||||
$fichierWsdl = $hostName . '-' . $fichierWsdl;
|
$hostScheme = $request->getScheme();
|
||||||
|
$fichierWsdl = $hostScheme . '-' . $hostName . '-' . $fichierWsdl;
|
||||||
$c = Zend_registry::get('config');
|
$c = Zend_registry::get('config');
|
||||||
$wsdlPath = $c->profil->path->shared . '/wsdl';
|
$wsdlPath = $c->profil->path->shared . '/wsdl';
|
||||||
|
|
||||||
@ -118,6 +119,7 @@ class ServiceController extends Zend_Controller_Action
|
|||||||
|| isset($_GET['wsdl-auto'])) {
|
|| isset($_GET['wsdl-auto'])) {
|
||||||
// --- Définition du webservice
|
// --- Définition du webservice
|
||||||
$wsdl = new Zend_Soap_AutoDiscover();
|
$wsdl = new Zend_Soap_AutoDiscover();
|
||||||
|
$wsdl->setUri($hostScheme . '://' . $hostName);
|
||||||
$wsdl->setComplexTypeStrategy('Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence');
|
$wsdl->setComplexTypeStrategy('Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence');
|
||||||
$wsdl->setOperationBodyStyle(array('use' => 'literal'));
|
$wsdl->setOperationBodyStyle(array('use' => 'literal'));
|
||||||
$wsdl->setBindingStyle(array('style' => 'document'));
|
$wsdl->setBindingStyle(array('style' => 'document'));
|
||||||
@ -151,7 +153,7 @@ class ServiceController extends Zend_Controller_Action
|
|||||||
&& file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
&& file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||||
$server = new Zend_Soap_Server($wsdlPath . '/' . $fichierWsdl);
|
$server = new Zend_Soap_Server($wsdlPath . '/' . $fichierWsdl);
|
||||||
} else {
|
} else {
|
||||||
$server = new Zend_Soap_Server('http://'.$hostName.'/'.$pathServiceUrl);
|
$server = new Zend_Soap_Server($hostScheme.'://'.$hostName.'/'.$pathServiceUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Sonde paramètres server
|
// --- Sonde paramètres server
|
||||||
|
Loading…
Reference in New Issue
Block a user