如何在PHP中将数组传递给SOAP
我想通过SOAP传递这个数组如何在PHP中将数组传递给SOAP,php,soapserver,Php,Soapserver,我想通过SOAP传递这个数组 'DeviceList'=>array('Devices'=> array( array('DeviceID'=>'teltec12347'), array('DeviceID'=>'teltec12347'), ) ) 我的SOAP服务器看起来像: $server->wsdl->addComplexType( 'Devic
'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'
);
我有这样的东西。
若我传递密码或开始日期,一切都正常,但问题在我想要传递数组时开始。我怎样才能正确地传递数组?应该是序列吗?是的,但这并没有解决我的问题。