summaryrefslogtreecommitdiffstats
path: root/library/vendor/Zend/Soap/Client
diff options
context:
space:
mode:
Diffstat (limited to 'library/vendor/Zend/Soap/Client')
-rw-r--r--library/vendor/Zend/Soap/Client/Common.php76
-rw-r--r--library/vendor/Zend/Soap/Client/DotNet.php93
-rw-r--r--library/vendor/Zend/Soap/Client/Exception.php34
-rw-r--r--library/vendor/Zend/Soap/Client/Local.php97
4 files changed, 300 insertions, 0 deletions
diff --git a/library/vendor/Zend/Soap/Client/Common.php b/library/vendor/Zend/Soap/Client/Common.php
new file mode 100644
index 0000000..7880115
--- /dev/null
+++ b/library/vendor/Zend/Soap/Client/Common.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id$
+ */
+
+
+if (extension_loaded('soap')) {
+
+/**
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ */
+class Zend_Soap_Client_Common extends SoapClient
+{
+ /**
+ * doRequest() pre-processing method
+ *
+ * @var callback
+ */
+ protected $_doRequestCallback;
+
+ /**
+ * Common Soap Client constructor
+ *
+ * @param callback $doRequestMethod
+ * @param string $wsdl
+ * @param array $options
+ */
+ function __construct($doRequestCallback, $wsdl, $options)
+ {
+ $this->_doRequestCallback = $doRequestCallback;
+
+ parent::__construct($wsdl, $options);
+ }
+
+ /**
+ * Performs SOAP request over HTTP.
+ * Overridden to implement different transport layers, perform additional XML processing or other purpose.
+ *
+ * @param string $request
+ * @param string $location
+ * @param string $action
+ * @param int $version
+ * @param int $one_way
+ * @return mixed
+ */
+ function __doRequest($request, $location, $action, $version, $one_way = null)
+ {
+ if ($one_way === null) {
+ return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version);
+ } else {
+ return call_user_func($this->_doRequestCallback, $this, $request, $location, $action, $version, $one_way);
+ }
+ }
+
+}
+
+} // end if (extension_loaded('soap')
diff --git a/library/vendor/Zend/Soap/Client/DotNet.php b/library/vendor/Zend/Soap/Client/DotNet.php
new file mode 100644
index 0000000..0e6d121
--- /dev/null
+++ b/library/vendor/Zend/Soap/Client/DotNet.php
@@ -0,0 +1,93 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id$
+ */
+
+/** Zend_Soap_Client */
+
+if (extension_loaded('soap')) {
+
+/**
+ * Zend_Soap_Client_Local
+ *
+ * Class is intended to be used with .Net Web Services.
+ *
+ * Important! Class is at experimental stage now.
+ * Please leave your notes, compatiblity issues reports or
+ * suggestions in fw-webservices@lists.zend.com or fw-general@lists.com
+ *
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ */
+class Zend_Soap_Client_DotNet extends Zend_Soap_Client
+{
+ /**
+ * Constructor
+ *
+ * @param string $wsdl
+ * @param array $options
+ */
+ public function __construct($wsdl = null, $options = null)
+ {
+ // Use SOAP 1.1 as default
+ $this->setSoapVersion(SOAP_1_1);
+
+ parent::__construct($wsdl, $options);
+ }
+
+
+ /**
+ * Perform arguments pre-processing
+ *
+ * My be overridden in descendant classes
+ *
+ * @param array $arguments
+ * @throws Zend_Soap_Client_Exception
+ */
+ protected function _preProcessArguments($arguments)
+ {
+ if (count($arguments) > 1 ||
+ (count($arguments) == 1 && !is_array(reset($arguments)))
+ ) {
+ throw new Zend_Soap_Client_Exception('.Net webservice arguments have to be grouped into array: array(\'a\' => $a, \'b\' => $b, ...).');
+ }
+
+ // Do nothing
+ return $arguments;
+ }
+
+ /**
+ * Perform result pre-processing
+ *
+ * My be overridden in descendant classes
+ *
+ * @param array $arguments
+ */
+ protected function _preProcessResult($result)
+ {
+ $resultProperty = $this->getLastMethod() . 'Result';
+
+ return $result->$resultProperty;
+ }
+
+}
+
+} // end if (extension_loaded('soap')
diff --git a/library/vendor/Zend/Soap/Client/Exception.php b/library/vendor/Zend/Soap/Client/Exception.php
new file mode 100644
index 0000000..2c210ed
--- /dev/null
+++ b/library/vendor/Zend/Soap/Client/Exception.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ */
+
+/** Zend_Exception */
+
+/**
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id$
+ */
+class Zend_Soap_Client_Exception extends Zend_Exception
+{}
+
diff --git a/library/vendor/Zend/Soap/Client/Local.php b/library/vendor/Zend/Soap/Client/Local.php
new file mode 100644
index 0000000..c060700
--- /dev/null
+++ b/library/vendor/Zend/Soap/Client/Local.php
@@ -0,0 +1,97 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id$
+ */
+
+/** Zend_Soap_Server */
+
+/** Zend_Soap_Client */
+
+if (extension_loaded('soap')) {
+
+/**
+ * Zend_Soap_Client_Local
+ *
+ * Class is intended to be used as local SOAP client which works
+ * with a provided Server object.
+ *
+ * Could be used for development or testing purposes.
+ *
+ * @category Zend
+ * @package Zend_Soap
+ * @subpackage Client
+ */
+class Zend_Soap_Client_Local extends Zend_Soap_Client
+{
+ /**
+ * Server object
+ *
+ * @var Zend_Soap_Server
+ */
+ protected $_server;
+
+ /**
+ * Local client constructor
+ *
+ * @param Zend_Soap_Server $server
+ * @param string $wsdl
+ * @param array $options
+ */
+ function __construct(Zend_Soap_Server $server, $wsdl, $options = null)
+ {
+ $this->_server = $server;
+
+ // Use Server specified SOAP version as default
+ $this->setSoapVersion($server->getSoapVersion());
+
+ parent::__construct($wsdl, $options);
+ }
+
+ /**
+ * Actual "do request" method.
+ *
+ * @internal
+ * @param Zend_Soap_Client_Common $client
+ * @param string $request
+ * @param string $location
+ * @param string $action
+ * @param int $version
+ * @param int $one_way
+ * @return mixed
+ */
+ public function _doRequest(Zend_Soap_Client_Common $client, $request, $location, $action, $version, $one_way = null)
+ {
+ // Perform request as is
+ ob_start();
+ $this->_server->handle($request);
+ $response = ob_get_clean();
+
+ if ($response === null || $response === '') {
+ $serverResponse = $this->server->getResponse();
+ if ($serverResponse !== null) {
+ $response = $serverResponse;
+ }
+ }
+
+ return $response;
+ }
+}
+
+} // end if (extension_loaded('soap')