From d2cdc9ccad77b764a0b0e87b34c5669fec0fd492 Mon Sep 17 00:00:00 2001 From: craigmarvelley Date: Wed, 4 Jan 2012 11:47:45 +0000 Subject: [PATCH 1/2] Updated to work with latest version of Zend\Soap --- ServiceBinding/RpcLiteralRequestMessageBinder.php | 2 +- ServiceDefinition/Dumper/WsdlTypeStrategy.php | 6 +++--- ServiceDefinition/Strategy/ComplexType.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ServiceBinding/RpcLiteralRequestMessageBinder.php b/ServiceBinding/RpcLiteralRequestMessageBinder.php index edef394..7a5934d 100644 --- a/ServiceBinding/RpcLiteralRequestMessageBinder.php +++ b/ServiceBinding/RpcLiteralRequestMessageBinder.php @@ -99,7 +99,7 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface $value = $this->processType($type->getValue(), $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())); } } diff --git a/ServiceDefinition/Dumper/WsdlTypeStrategy.php b/ServiceDefinition/Dumper/WsdlTypeStrategy.php index 62610e8..b6f18fa 100644 --- a/ServiceDefinition/Dumper/WsdlTypeStrategy.php +++ b/ServiceDefinition/Dumper/WsdlTypeStrategy.php @@ -17,10 +17,10 @@ use BeSimple\SoapBundle\Util\String; use Zend\Soap\Exception; use Zend\Soap\Wsdl as BaseWsdl; -use Zend\Soap\Wsdl\Strategy; -use Zend\Soap\Wsdl\Strategy\ArrayOfTypeSequence; +use Zend\Soap\Wsdl\ComplexTypeStrategy; +use Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeSequence; -class WsdlTypeStrategy implements Strategy +class WsdlTypeStrategy implements ComplexTypeStrategy { /** * Context WSDL file diff --git a/ServiceDefinition/Strategy/ComplexType.php b/ServiceDefinition/Strategy/ComplexType.php index 88c1adf..9913619 100644 --- a/ServiceDefinition/Strategy/ComplexType.php +++ b/ServiceDefinition/Strategy/ComplexType.php @@ -48,7 +48,7 @@ class ComplexType extends AbstractStrategy $dom = $this->getContext()->toDomDocument(); - $soapTypeName = Wsdl::translateType($type); + $soapTypeName = $this->getContext()->translateType($type); $soapType = 'tns:'.$soapTypeName; if (!$classmap->has($soapTypeName)) { From a8c2fbb13ab716a7580825c515a1b9358a5eeb4a Mon Sep 17 00:00:00 2001 From: craigmarvelley Date: Thu, 5 Jan 2012 16:37:12 +0000 Subject: [PATCH 2/2] Fixed bug causing annotations in inheriting controllers to be ignored --- ServiceDefinition/Loader/AnnotationClassLoader.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ServiceDefinition/Loader/AnnotationClassLoader.php b/ServiceDefinition/Loader/AnnotationClassLoader.php index d76ec56..f545786 100644 --- a/ServiceDefinition/Loader/AnnotationClassLoader.php +++ b/ServiceDefinition/Loader/AnnotationClassLoader.php @@ -96,7 +96,7 @@ class AnnotationClassLoader implements LoaderInterface $serviceMethod = new Definition\Method( $annotation->getValue(), - $this->getController($method, $annotation) + $this->getController($class, $method, $annotation) ); } elseif ($annotation instanceof Annotation\Result) { if ($serviceReturn) { @@ -134,12 +134,12 @@ class AnnotationClassLoader implements LoaderInterface * * @return string */ - private function getController(\ReflectionMethod $method, Annotation\Method $annotation) + private function getController(\ReflectionClass $class, \ReflectionMethod $method, Annotation\Method $annotation) { if(null !== $annotation->getService()) { return $annotation->getService() . ':' . $method->name; } else { - return $method->class . '::' . $method->name; + return $class->name . '::' . $method->name; } }