NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
wsdl - nusoap


Joined: 25 Oct 2005
Posts: 5
Reply with quote
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??? Mad
View user's profileFind all posts by mr_cheSend private message
wsdl - nusoap
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic