Skip to content
Snippets Groups Projects
Commit be7d7055 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

fix : pb with url in ws

parent 70d5fc41
No related branches found
No related tags found
No related merge requests found
<?php <?php
require_once('SOAP/Disco.php'); require_once('SOAP/Disco.php');
require_once('core/class/Url.php');
class Maarch_SOAP_DISCO_Server extends SOAP_DISCO_Server class Maarch_SOAP_DISCO_Server extends SOAP_DISCO_Server
{ {
...@@ -18,19 +19,12 @@ class Maarch_SOAP_DISCO_Server extends SOAP_DISCO_Server ...@@ -18,19 +19,12 @@ class Maarch_SOAP_DISCO_Server extends SOAP_DISCO_Server
$rootUri = self::_getRootUri(); $rootUri = self::_getRootUri();
$protocol = (array_key_exists('HTTPS', $_SERVER) && $_SERVER['HTTPS'] == 'on') $protocol = (array_key_exists('HTTPS', $_SERVER) && $_SERVER['HTTPS'] == 'on')
? 'https://' : 'http://' ; ? 'https://' : 'http://' ;
$selfFilename = basename(__file__); return $protocol . $this->host . $rootUri . '/' . basename(Url::scriptName());
return $protocol . $this->host . $rootUri;
} }
private static function _getRootUri() private static function _getRootUri()
{ {
$rootUri = array_key_exists('HTTP_X_BASE_URL', $_SERVER) return Url::baseUri();
? str_replace($_SERVER['HTTP_X_BASE_URL'], '',
$_SERVER['SCRIPT_NAME'])
: $_SERVER['SCRIPT_NAME'];
$endPos = strlen($rootUri) - strrpos($rootUri, '/');
$rootUri = substr($rootUri, 0, $endPos);
return $rootUri . '.php';
} }
public function _generate_WSDL() public function _generate_WSDL()
......
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