--- standard/trunk/library/Zend/Soap/AutoDiscover.php	2008-07-02 18:27:25.000000000 +0200
+++ standard/trunk/library/Zend/Soap/AutoDiscover.php	2008-08-29 16:30:53.000000000 +0200
@@ -73,7 +73,9 @@
      */
     public function setClass($class, $namespace = '', $argv = null)
     {
-        $uri = Zend_Uri::factory('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);
+        $schema = 'http';
+        if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') $schema = 'https';
+        $uri = Zend_Uri::factory($schema . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME']);
 
         $wsdl = new Zend_Soap_Wsdl($class, $uri, $this->_extractComplexTypes);
         

