File indexing completed on 2024-05-26 06:03:31

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Soap
0017  * @subpackage Client
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /** Zend_Soap_Client */
0024 // require_once 'Zend/Soap/Client.php';
0025 
0026 if (extension_loaded('soap')) {
0027 
0028 /**
0029  * Zend_Soap_Client_Local
0030  *
0031  * Class is intended to be used with .Net Web Services.
0032  *
0033  * Important! Class is at experimental stage now.
0034  * Please leave your notes, compatiblity issues reports or
0035  * suggestions in fw-webservices@lists.zend.com or fw-general@lists.com
0036  *
0037  * @category   Zend
0038  * @package    Zend_Soap
0039  * @subpackage Client
0040  */
0041 class Zend_Soap_Client_DotNet extends Zend_Soap_Client
0042 {
0043     /**
0044      * Constructor
0045      *
0046      * @param string $wsdl
0047      * @param array $options
0048      */
0049     public function __construct($wsdl = null, $options = null)
0050     {
0051         // Use SOAP 1.1 as default
0052         $this->setSoapVersion(SOAP_1_1);
0053 
0054         parent::__construct($wsdl, $options);
0055     }
0056 
0057 
0058     /**
0059      * Perform arguments pre-processing
0060      *
0061      * My be overridden in descendant classes
0062      *
0063      * @param array $arguments
0064      * @throws Zend_Soap_Client_Exception
0065      */
0066     protected function _preProcessArguments($arguments)
0067     {
0068         if (count($arguments) > 1  ||
0069             (count($arguments) == 1  &&  !is_array(reset($arguments)))
0070            ) {
0071             // require_once 'Zend/Soap/Client/Exception.php';
0072             throw new Zend_Soap_Client_Exception('.Net webservice arguments have to be grouped into array: array(\'a\' => $a, \'b\' => $b, ...).');
0073         }
0074 
0075         // Do nothing
0076         return $arguments;
0077     }
0078 
0079     /**
0080      * Perform result pre-processing
0081      *
0082      * My be overridden in descendant classes
0083      *
0084      * @param array $arguments
0085      */
0086     protected function _preProcessResult($result)
0087     {
0088         $resultProperty = $this->getLastMethod() . 'Result';
0089 
0090         return $result->$resultProperty;
0091     }
0092 
0093 }
0094 
0095 } // end if (extension_loaded('soap')