【发布时间】:2016-06-20 10:52:26
【问题描述】:
我用nusoap 和php 开发了一个soap web 服务。在这个 Web 服务中,我定义了一个名为 charge 的自定义类型,如下所示:
$server->wsdl->addComplexType('charge',
'complexType',
'struct',
'all',
'',
array(
'code' => array('name' => 'code', 'type' => 'xsd:string'),
'value' => array('name' => 'value', 'type' => 'xsd:string')
)
);
我想定义另一种自定义类型,其中费用自定义类型用作数据类型,如下所示:
$server->wsdl->addComplexType('send',
'complexType',
'struct',
'all',
'',
array(
'send' => array('name' => 'send', 'type' => 'xsd:charge')
)
);
然后我得到这个错误:
Could not find type 'charge@http://www.w3.org/2001/XMLSchema'
在 nusoap 中使用自定义类型作为另一个自定义类型中的数据类型的正确方法是什么?
【问题讨论】:
标签: php nusoap custom-type