Example #1
0
	public function __construct($wsdl, $accounting)
	{
		parent::__construct($wsdl, array("encoding" => "utf-8"));

		$this->accounting = $accounting;
		$this->setObject($this);
	}
 public function __construct($wsdl, array $options = null)
 {
     $xml_security = new XML_Security();
     $xml_security->enableExternalLoadOfEntities();
     parent::__construct($wsdl, $options);
     $xml_security->disableExternalLoadOfEntities();
 }
Example #3
0
 /**
  * Creates and returns a new SoapServer
  * with empty inbound and outbound pipelines.
  *
  * @param   string|null $wsdl
  * @param   array       $options
  */
 public function __construct($wsdl, array $options = array())
 {
     parent::__construct($wsdl, $options);
     // initialize in and outbound pipelines
     $this->inboundPipeline = new Pipeline();
     $this->outboundPipeline = new Pipeline();
 }
Example #4
0
 /**
  * Constructor.
  *
  * @param string               $wsdl    WSDL file
  * @param array(string=>mixed) $options Options array
  */
 public function __construct($wsdl, array $options = array())
 {
     // store SOAP version
     if (isset($options['soap_version'])) {
         $this->soapVersion = $options['soap_version'];
     }
     // create soap kernel instance
     $this->soapKernel = new SoapKernel();
     // set up type converter and mime filter
     $this->configureMime($options);
     // we want the exceptions option to be set
     $options['exceptions'] = true;
     parent::__construct($wsdl, $options);
 }
Example #5
0
 public function __construct($server = null)
 {
     $this->speed = microtime(true);
     if (empty($server)) {
         $this->server = $_SERVER;
     } else {
         $this->server = $server;
     }
     $this->post = file_get_contents("php://input");
     /*
     ini_set('soap.wsdl_cache_enabled', '0');
     ini_set('soap.wsdl_cache_ttl', '0'); 
     */
     $this->config = (include_once CONFIG_FILE);
     parent::__construct(null, array('uri' => "http://api.example.com"));
     //date_default_timezone_set('Asia/Hong_Kong');
     $this->logging = new \framework\log\Logging($logfile = $this->config['logdir'] . 'log.' . date('Y-m-d') . '.log');
     $this->logging->info('SOAP Server start...');
     $this->logging->debug($this->post);
     $this->acl();
     $this->load();
     $this->setClass($this->class);
 }
 /**
  * Constructor
  */
 function __construct()
 {
     $this->nombreWS = NOMBRE_WEB_SERVICE;
     $this->metodos = unserialize(METODOS_SOAP);
     return parent::__construct(WSDL, unserialize(OPCIONES_SOAP));
 }
Example #7
0
 public function __construct($wsdl)
 {
     parent::__construct($wsdl);
     $this->setClass("ACCOUNTING_QUICKBOOKS_HANDLERS");
 }
 function __construct()
 {
     // to support SoapGatewayBase
     // --------------------------
     if (!$this->mWsdlFile && !empty($this->mRegisteredFunctions)) {
         foreach ($this->mRegisteredFunctions as $func_name => $params) {
             if (is_array($params) && $params != NULL) {
                 $this->Register($func_name, $params['in'], $params['out'], $params['namespace'], $params['soapaction'], $params['style'], $params['use'], $params['documentation'], $params['encodingStyle']);
             } else {
                 $this->Register($func_name);
             }
         }
     }
     ///////////
     if (!$this->mWsdlFile && empty($this->mRegisteredFunctions)) {
         // doing magic here... avrakedavra!
         // $mServiceDescriptions is a static property, so it won't be inherited
         // as the result, we must do some tricks here. first we find what class is
         // being instantiated (from the dispatcher, of course. mmm.. no, no, use
         // get_class instead. it's definitly more efficient). then we use that
         // information to obtain the actual $mServiceDescriptions
         // see note about $mServiceDescriptions above for another information
         $class_name = get_class($this);
         eval('$service_description = ' . $class_name . '::$mServiceDescriptions;');
         if (!empty($service_description)) {
             // get default binding style
             eval('$default_style = ' . $class_name . '::$mServiceBindingStyle;');
             // setting up wsdl
             $this->ConfigureWsdl($class_name, FALSE, Configuration::Instance()->GetValue('application', 'baseaddress') . Dispatcher::Instance()->GetUrl(Dispatcher::Instance()->mModule, Dispatcher::Instance()->mSubModule, Dispatcher::Instance()->mAction, Dispatcher::Instance()->mType, TRUE), $default_style);
             // register functions to be exposed as service
             if (isset($service_description['service']) && is_array($service_description['service'])) {
                 foreach ($service_description['service'] as $func_name => $params) {
                     // skip undeclared fuctions
                     if (!method_exists($this, 'Service' . $func_name)) {
                         continue;
                     }
                     if (is_array($params) && $params != NULL) {
                         $this->Register($func_name, $params['in'], $params['out'], $params['namespace'], $params['soapaction'], $params['style'], $params['use'], $params['documentation'], $params['encodingStyle']);
                     } else {
                         $this->Register($func_name);
                     }
                 }
             }
             // register types used in services
             if (isset($service_description['type']) && is_array($service_description['type'])) {
                 foreach ($service_description['type'] as $type_name => $params) {
                     if (is_array($params) && $params != NULL) {
                         if ($params['typeClass'] == 'complexType' || $params['typeClass'] == 'attribute') {
                             $this->wsdl->addComplexType($type_name, $params['typeClass'], $params['phpType'], $params['compositor'], $params['restrictionBase'], $params['elements'], $params['attrs'], $params['arrayType']);
                         } else {
                             if ($params['typeClass'] == 'simpleType') {
                                 // always scalar
                                 $this->wsdl->addSimpleType($type_name, $params['restrictionBase'], $params['typeClass'], 'scalar', $params['enumeration']);
                             }
                         }
                     }
                 }
             }
         }
     }
     $this->mWsdlFile = NULL;
     $soap_server_options = array();
     if (!$this->mWsdlFile && empty($this->mRegisteredFunctions) && empty($service_description)) {
         $soap_server_options['uri'] = Configuration::Instance()->GetValue('application', 'baseaddress') . Configuration::Instance()->GetValue('application', 'basedir');
     } else {
         // generate wsdl
         if ($this->wsdl) {
             $this->mWsdlFile = Configuration::Instance()->GetTempDir() . '/php_wsdl-' . md5(Configuration::Instance()->GetValue('application', 'baseaddress') . Dispatcher::Instance()->GetUrl(Dispatcher::Instance()->mModule, Dispatcher::Instance()->mSubModule, Dispatcher::Instance()->mAction, Dispatcher::Instance()->mType, TRUE));
             $wsdl_string = $this->wsdl->serialize($this->mDebugMode);
             $fp = fopen($this->mWsdlFile, 'w');
             fwrite($fp, $wsdl_string);
             fclose($fp);
         }
     }
     parent::__construct($this->mWsdlFile, $soap_server_options);
     $this->setClass('SoapResponseDummy', $this);
 }