Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Preparing to tag 2.1.0 -- all new features from develop are now merged to master.
  • Loading branch information
Show file tree
Hide file tree
Showing 29 changed files with 779 additions and 252 deletions.
17 changes: 11 additions & 6 deletions src/AutoDiscover.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Soap
*/

namespace Zend\Soap;
Expand All @@ -20,10 +19,6 @@

/**
* \Zend\Soap\AutoDiscover
*
* @category Zend
* @package Zend_Soap
* @subpackage AutoDiscover
*/
class AutoDiscover
{
Expand Down Expand Up @@ -199,7 +194,7 @@ public function getServiceName()


/**
* Set the location at which the WSDL file will be availabe.
* Set the location at which the WSDL file will be available.
*
* @param Uri\Uri|string $uri
* @return AutoDiscover
Expand Down Expand Up @@ -375,6 +370,7 @@ protected function _generateWsdl(array $reflectionMethods)
$uri = $this->getUri();

$serviceName = $this->getServiceName();
/** @var Wsdl $wsdl */
$wsdl = new $this->wsdlClass($serviceName, $uri, $this->strategy, $this->classMap);

// The wsdl:types element must precede all other elements (WS-I Basic Profile 1.1 R2023)
Expand Down Expand Up @@ -548,4 +544,13 @@ public function toXml()
{
return $this->generate()->toXml();
}

/**
* Handle WSDL document.
*/
public function handle()
{
header('Content-Type: text/xml');
echo $this->toXml();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Soap
*/

namespace Zend\Soap\AutoDiscover\DiscoveryStrategy;
Expand All @@ -16,10 +15,6 @@

/**
* Describes how types, return values and method details are detected during AutoDiscovery of a WSDL.
*
* @category Zend
* @package Zend_Soap
* @subpackage WSDL
*/
interface DiscoveryStrategyInterface
{
Expand Down
5 changes: 0 additions & 5 deletions src/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Soap
*/

namespace Zend\Soap\AutoDiscover\DiscoveryStrategy;
Expand All @@ -16,10 +15,6 @@

/**
* Describes how types, return values and method details are detected during AutoDiscovery of a WSDL.
*
* @category Zend
* @package Zend_Soap
* @subpackage WSDL
*/

class ReflectionDiscovery implements DiscoveryStrategyInterface
Expand Down
24 changes: 10 additions & 14 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Soap
*/

namespace Zend\Soap;
Expand All @@ -18,10 +17,6 @@

/**
* \Zend\Soap\Client
*
* @category Zend
* @package Zend_Soap
* @subpackage Client
*/
class Client implements ServerClient
{
Expand Down Expand Up @@ -318,7 +313,7 @@ public function getOptions()
*
* @param int $version One of the SOAP_1_1 or SOAP_1_2 constants
* @return Client
* @throws Exception\ExceptionInterface with invalid soap version argument
* @throws Exception\InvalidArgumentException with invalid soap version argument
*/
public function setSoapVersion($version)
{
Expand Down Expand Up @@ -347,7 +342,7 @@ public function getSoapVersion()
*
* @param array $classmap
* @return Client
* @throws Exception\ExceptionInterface for any invalid class in the class map
* @throws Exception\InvalidArgumentException for any invalid class in the class map
*/
public function setClassmap(array $classmap)
{
Expand Down Expand Up @@ -378,7 +373,7 @@ public function getClassmap()
*
* @param string $encoding
* @return Client
* @throws Exception\ExceptionInterface with invalid encoding argument
* @throws Exception\InvalidArgumentException with invalid encoding argument
*/
public function setEncoding($encoding)
{
Expand Down Expand Up @@ -408,7 +403,7 @@ public function getEncoding()
*
* @param string $urn
* @return bool
* @throws Exception\ExceptionInterface on invalid URN
* @throws Exception\InvalidArgumentException on invalid URN
*/
public function validateUrn($urn)
{
Expand Down Expand Up @@ -484,7 +479,7 @@ public function getLocation()
*
* @param int $style One of the SOAP_RPC or SOAP_DOCUMENT constants
* @return Client
* @throws Exception\ExceptionInterface with invalid style argument
* @throws Exception\InvalidArgumentException with invalid style argument
*/
public function setStyle($style)
{
Expand Down Expand Up @@ -514,7 +509,7 @@ public function getStyle()
*
* @param int $use One of the SOAP_ENCODED or SOAP_LITERAL constants
* @return Client
* @throws Exception\ExceptionInterface with invalid message encoding method argument
* @throws Exception\InvalidArgumentException with invalid message encoding method argument
*/
public function setEncodingMethod($use)
{
Expand Down Expand Up @@ -684,7 +679,7 @@ public function setProxyPassword($proxyPassword)
*
* @param string $localCert local certificate path
* @return Client
* @throws Exception\ExceptionInterface with invalid local certificate path argument
* @throws Exception\InvalidArgumentException with invalid local certificate path argument
*/
public function setHttpsCertificate($localCert)
{
Expand Down Expand Up @@ -777,6 +772,7 @@ public function getProxyPassword()
*
* @param resource $context
* @return Client
* @throws Exception\InvalidArgumentException if $context is not a valid stream resource
*/
public function setStreamContext($context)
{
Expand Down Expand Up @@ -1108,7 +1104,7 @@ public function call($method, $params = array())
* Return a list of available functions
*
* @return array
* @throws Exception\ExceptionInterface
* @throws Exception\UnexpectedValueException
*/
public function getFunctions()
{
Expand All @@ -1131,7 +1127,7 @@ public function getFunctions()
* Return a list of SOAP types
*
* @return array
* @throws Exception\ExceptionInterface
* @throws Exception\UnexpectedValueException
*/
public function getTypes()
{
Expand Down
11 changes: 3 additions & 8 deletions src/Client/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Soap
*/

namespace Zend\Soap\Client;

if (extension_loaded('soap')) {

/**
* @category Zend
* @package Zend_Soap
* @subpackage Client
*/
class Common extends \SoapClient
{
/**
Expand Down Expand Up @@ -53,11 +47,12 @@ public function __construct($doRequestCallback, $wsdl, $options)
*/
public function __doRequest($request, $location, $action, $version, $oneWay = null)
{
// ltrim is a workaround for https://bugs.php.net/bug.php?id=63780
if ($oneWay === null) {
return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version);
return call_user_func($this->doRequestCallback, $this, ltrim($request), $location, $action, $version);
}

return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version, $oneWay);
return call_user_func($this->doRequestCallback, $this, ltrim($request), $location, $action, $version, $oneWay);
}
}

Expand Down
Loading

0 comments on commit da20dbf

Please sign in to comment.