Public Member Functions | |
run () |
Definition at line 34 of file Soap.php.
run | ( | ) |
Run webservice
Mage_Api_Controller_Action | $controller |
Reimplemented from Mage_Api_Model_Server_Adapter_Soap.
Definition at line 42 of file Soap.php.
00043 { 00044 $urlModel = Mage::getModel('core/url') 00045 ->setUseSession(false); 00046 if ($this->getController()->getRequest()->getParam('wsdl')) { 00047 $wsdlConfig = Mage::getModel('api/wsdl_config'); 00048 $wsdlConfig->setHandler($this->getHandler()) 00049 ->init(); 00050 $this->getController()->getResponse() 00051 ->setHeader('Content-Type','text/xml') 00052 ->setBody($wsdlConfig->getWsdlContent()); 00053 } elseif ($this->_extensionLoaded()) { 00054 $this->_soap = new SoapServer($urlModel->getUrl('*/*/*', array('wsdl'=>1))); 00055 use_soap_error_handler(false); 00056 $this->_soap->setClass($this->getHandler()); 00057 $this->getController()->getResponse() 00058 ->setHeader('Content-Type', 'text/xml') 00059 ->setBody($this->_soap->handle()); 00060 00061 } else { 00062 $this->fault('0', 'Unable to load Soap extension on the server'); 00063 } 00064 return $this; 00065 }