有人管理从类创建复杂类型。我有下一个错误
PHP致命错误:调用成员函数getTypes()
$complex_type_strategy = new \Zend\Soap\Wsdl\ComplexTypeStrategy\DefaultComplexType();
$complex_type_strategy->addComplexType('className');
$autodiscover->setComplexTypeStrategy($complex_type_strategy);
.....
class className {
/**
* @var string $field
*/
public $field;
}
由于
答案 0 :(得分:1)
尝试以这种方式:
<?php
use Zend\Soap\Wsdl\ComplexTypeStrategy\ArrayOfTypeComplex;
$autodiscover = new AutoDiscover(new ArrayOfTypeComplex());
$autodiscover->setClassMap(array('Application\Class\Document'));
$autodiscover->setUri('http://myws.me/ws');
$autodiscover->handle();