Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/249.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在PHP中将数组传递给SOAP_Php_Soapserver - Fatal编程技术网

如何在PHP中将数组传递给SOAP

如何在PHP中将数组传递给SOAP,php,soapserver,Php,Soapserver,我想通过SOAP传递这个数组 'DeviceList'=>array('Devices'=> array( array('DeviceID'=>'teltec12347'), array('DeviceID'=>'teltec12347'), ) ) 我的SOAP服务器看起来像: $server->wsdl->addComplexType( 'Devic

我想通过SOAP传递这个数组

'DeviceList'=>array('Devices'=>
        array(
           array('DeviceID'=>'teltec12347'),
           array('DeviceID'=>'teltec12347'),      
        )
    )
我的SOAP服务器看起来像:

 $server->wsdl->addComplexType(
    'DeviceList',
    'complexType',
    'struct',
    '',
    '',
    array(
        'Devices'=> array('name'=>'Devices','type'=>'tns:DeviceArray')  
   )
);

$server->wsdl->addComplexType(
    'DeviceArray',
    'complexType',
    'array',
    'secuence',
    '',
    array(
        'DeviceID'     => array('name'=>'DeviceID','type'=>'xsd:string'), 
    ),
    'tns:DeviceList'
);
$server->register('shipmentDelivery',
    array(
    'ShopID'=>'xsd:int',
    'Password'=>'xsd:string',
    'ShipmentID'=>'xsd:string',
    'StartDate'=>'xsd:string',
    'EndDate'=>'xsd:string',
    'DeviceList'=>'tns:DeviceList'),
    array('return'=>'xsd:string'), 
    'urn:canaiwsdl',
    'urn:canaiwsdl#shipmentDelivery',
    'rpc',
    'encoded',
    'Hardware list'
);
我有这样的东西。
若我传递密码或开始日期,一切都正常,但问题在我想要传递数组时开始。我怎样才能正确地传递数组?

应该是序列吗?是的,但这并没有解决我的问题。