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;
|
||||
|
||||
// --- Get hostname - add compatibility with Reverse Proxy
|
||||
$hostName = $this->getRequest()->getHttpHost();
|
||||
$fichierWsdl = $hostName . '-' . $fichierWsdl;
|
||||
$hostName = $request->getHttpHost();
|
||||
$hostScheme = $request->getScheme();
|
||||
$fichierWsdl = $hostScheme . '-' . $hostName . '-' . $fichierWsdl;
|
||||
$c = Zend_registry::get('config');
|
||||
$wsdlPath = $c->profil->path->shared . '/wsdl';
|
||||
|
||||
@ -118,6 +119,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
|| isset($_GET['wsdl-auto'])) {
|
||||
// --- Définition du webservice
|
||||
$wsdl = new Zend_Soap_AutoDiscover();
|
||||
$wsdl->setUri($hostScheme . '://' . $hostName);
|
||||
$wsdl->setComplexTypeStrategy('Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence');
|
||||
$wsdl->setOperationBodyStyle(array('use' => 'literal'));
|
||||
$wsdl->setBindingStyle(array('style' => 'document'));
|
||||
@ -151,7 +153,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
&& file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||
$server = new Zend_Soap_Server($wsdlPath . '/' . $fichierWsdl);
|
||||
} else {
|
||||
$server = new Zend_Soap_Server('http://'.$hostName.'/'.$pathServiceUrl);
|
||||
$server = new Zend_Soap_Server($hostScheme.'://'.$hostName.'/'.$pathServiceUrl);
|
||||
}
|
||||
|
||||
// --- Sonde paramètres server
|
||||
|
Loading…
Reference in New Issue
Block a user