Used BeSimple\SoapCommon\Classmap for the webservice context
This commit is contained in:
@ -12,6 +12,7 @@ namespace BeSimple\SoapBundle\ServiceDefinition\Strategy;
|
||||
|
||||
use BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationComplexTypeLoader;
|
||||
|
||||
use BeSimple\SoapCommon\Classmap;
|
||||
use Zend\Soap\Wsdl;
|
||||
use Zend\Soap\Wsdl\Strategy\AbstractStrategy;
|
||||
|
||||
@ -21,11 +22,13 @@ use Zend\Soap\Wsdl\Strategy\AbstractStrategy;
|
||||
class ComplexType extends AbstractStrategy
|
||||
{
|
||||
private $loader;
|
||||
private $classmap;
|
||||
private $definition;
|
||||
|
||||
public function __construct(AnnotationComplexTypeLoader $loader, $definition)
|
||||
public function __construct(AnnotationComplexTypeLoader $loader, Classmap $classmap, $definition)
|
||||
{
|
||||
$this->loader = $loader;
|
||||
$this->classmap = $classmap;
|
||||
$this->definition = $definition;
|
||||
}
|
||||
|
||||
@ -50,6 +53,8 @@ class ComplexType extends AbstractStrategy
|
||||
$soapTypeName = Wsdl::translateType($type);
|
||||
$soapType = 'tns:'.$soapTypeName;
|
||||
|
||||
$this->classmap->add($soapTypeName, $type);
|
||||
|
||||
// Register type here to avoid recursion
|
||||
$this->getContext()->addType($type, $soapType);
|
||||
|
||||
|
Reference in New Issue
Block a user