|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00024 require_once 'Zend/Soap/Client.php'; 00025 00026 if (extension_loaded('soap')) { 00027 00041 class Zend_Soap_Client_DotNet extends Zend_Soap_Client 00042 { 00049 public function __construct($wsdl = null, $options = null) 00050 { 00051 // Use SOAP 1.1 as default 00052 $this->setSoapVersion(SOAP_1_1); 00053 00054 parent::__construct($wsdl, $options); 00055 } 00056 00057 00066 protected function _preProcessArguments($arguments) 00067 { 00068 if (count($arguments) > 1 || 00069 (count($arguments) == 1 && !is_array(reset($arguments))) 00070 ) { 00071 require_once 'Zend/Soap/Client/Exception.php'; 00072 throw new Zend_Soap_Client_Exception('.Net webservice arguments have to be grouped into array: array(\'a\' => $a, \'b\' => $b, ...).'); 00073 } 00074 00075 // Do nothing 00076 return $arguments; 00077 } 00078 00086 protected function _preProcessResult($result) 00087 { 00088 $resultProperty = $this->getLastMethod() . 'Result'; 00089 00090 return $result->$resultProperty; 00091 } 00092 00093 } 00094 00095 } // end if (extension_loaded('soap')