如何使用自定义类型作为nusoap中另一个自定义类型的数据类型

问题描述:

我开发了一个带有nusoapphp的肥皂web服务。在此Web服务,我已经定义了一个自定义类型命名负责波纹管:如何使用自定义类型作为nusoap中另一个自定义类型的数据类型

$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 '[email protected]://www.w3.org/2001/XMLSchema' 

什么是在其他的NuSOAP自定义类型使用自定义类型的数据类型的正确方法是什么?

send对象必须更改为下面的xsd:charge必须更改为tns:charge。

$server->wsdl->addComplexType('send', 
     'complexType', 
     'struct', 
     'all', 
     '', 
     array(
       'send' => array('name' => 'send', 'type' => 'tns:charge') 
     ) 
    );