Merge pull request #27 from boxuk/master
Updated code to work with more recent versions of Zend library dependencies
This commit is contained in:
commit
3a963b0201
|
@ -107,7 +107,7 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$type->isNillable() && null === $value) {
|
if (!$type->isNillable() && null === $value) {
|
||||||
throw new \SoapFault('SOAP_ERROR_COMPLEX_TYPE', sprintf('"%s:%s" cannot be null.', ucfirst(Wsdl::translateType($phpType)), $type->getName()));
|
throw new \SoapFault('SOAP_ERROR_COMPLEX_TYPE', sprintf('"%s:%s" cannot be null.', ucfirst($phpType), $type->getName()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,10 @@ use BeSimple\SoapBundle\Util\String;
|
||||||
|
|
||||||
use Zend\Soap\Exception;
|
use Zend\Soap\Exception;
|
||||||
use Zend\Soap\Wsdl as BaseWsdl;
|
use Zend\Soap\Wsdl as BaseWsdl;
|
||||||
use Zend\Soap\Wsdl\Strategy;
|
use Zend\Soap\Wsdl\ComplexTypeStrategy;
|
||||||
use Zend\Soap\Wsdl\Strategy\ArrayOfTypeSequence;
|
use Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeSequence;
|
||||||
|
|
||||||
class WsdlTypeStrategy implements Strategy
|
class WsdlTypeStrategy implements ComplexTypeStrategy
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Context WSDL file
|
* Context WSDL file
|
||||||
|
|
|
@ -96,7 +96,7 @@ class AnnotationClassLoader implements LoaderInterface
|
||||||
|
|
||||||
$serviceMethod = new Definition\Method(
|
$serviceMethod = new Definition\Method(
|
||||||
$annotation->getValue(),
|
$annotation->getValue(),
|
||||||
$this->getController($method, $annotation)
|
$this->getController($class, $method, $annotation)
|
||||||
);
|
);
|
||||||
} elseif ($annotation instanceof Annotation\Result) {
|
} elseif ($annotation instanceof Annotation\Result) {
|
||||||
if ($serviceReturn) {
|
if ($serviceReturn) {
|
||||||
|
@ -134,12 +134,12 @@ class AnnotationClassLoader implements LoaderInterface
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
private function getController(\ReflectionMethod $method, Annotation\Method $annotation)
|
private function getController(\ReflectionClass $class, \ReflectionMethod $method, Annotation\Method $annotation)
|
||||||
{
|
{
|
||||||
if(null !== $annotation->getService()) {
|
if(null !== $annotation->getService()) {
|
||||||
return $annotation->getService() . ':' . $method->name;
|
return $annotation->getService() . ':' . $method->name;
|
||||||
} else {
|
} else {
|
||||||
return $method->class . '::' . $method->name;
|
return $class->name . '::' . $method->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ class ComplexType extends AbstractStrategy
|
||||||
|
|
||||||
$dom = $this->getContext()->toDomDocument();
|
$dom = $this->getContext()->toDomDocument();
|
||||||
|
|
||||||
$soapTypeName = Wsdl::translateType($type);
|
$soapTypeName = $this->getContext()->translateType($type);
|
||||||
$soapType = 'tns:'.$soapTypeName;
|
$soapType = 'tns:'.$soapTypeName;
|
||||||
|
|
||||||
if (!$classmap->has($soapTypeName)) {
|
if (!$classmap->has($soapTypeName)) {
|
||||||
|
|
Loading…
Reference in New Issue