I need to pass an array into a wsdl SOAP service using NuSoap.
The problem is that the array does not have a set or defined list of parameters.
Therefore in my SOAP service I cannot register a structure because I will never know exactly how many parameters will be passed in.
e.g. In the Client
$param_couriers=array(
'items'=>array(
'item_1'=>array('item_num'=>'1'),
'item_2'=> array('item_num'=>'2'),
'item_3'=> array('item_num'=>'3')
)
);
$data->_couriers = $soapclient->call('get_couriers',array('cours_parsIn' => $param_couriers));
e.g. In the Server (I cant do following as dont know how many items will pass in.
$server->wsdl->addComplexType(
'cours_parsIn',
'complexType',
'struct',
'all',
'',
array(
'item_1'=> array ('name'=>'item_1,'type'=>'xsd:string'),
'item_2'=> array('name'=>'item_2','type'=>'xsd:string'),
'item_3'=> array('name'=>'item_3','type'=>'xsd:string')
)
);
Any ideas??