I have called a wsdl nusoap web service, and passed a nested array into it.
When I echo out the output from the service call, i notice that the nested array has been picked up e.g.
value=array(2) {
["general_data"]=>
array(6) {
["customer_db"]=>
string(7) "chesweb"
["residence_cntryID"]=>
string(3) "202"
["delivery_cntryID"]=>
string(3) "202"
["basket_total"]=>
string(4) "3526"
["weight_total"]=>
string(2) "60"
["extra_items"]=>
string(2) "no"
}
["items"]=>
array(2) {
["item_1"]=>
array(1) {
["tariff_band"]=>
string(1) "1"
}
["item_2"]=>
array(1) {
["tariff_band"]=>
string(1) "1"
}
}
}
The array struct has been setup:
$server->wsdl->addComplexType(
'cours_parsIn',
'complexType',
'struct',
'all',
'',
array(
array('name'=>'general_data','type'=>'xsd:string','maxOccurs' => 'unbounded'),
array('name'=>'items','type'=>'xsd:string','maxOccurs' => 'unbounded')
)
);
How do I reference the array values so I can use them in the service.
For example if I want to pick up the customer_db value,
I have tried......... $customer_db = $cours_parsIn['general_data']['customer_db'];
but it doesn't pick up the value.
Where am I going wrong???