php - Multidimensional associative array as response in NuSOAP -


i have problems response in soap. in general can not undertand how response multidimensional associative array soap-client. used nusoap v 1.123 library.

so have code in soap-server:

$server->wsdl->addcomplextype(     'returndatainside',     'complextype',     'struct',     'all',     '',     array(         'message'               => array('name' => 'message', 'type' => 'xsd:string', 'nillable' => 'true'),         'value' => array('name' => 'value', 'type' => 'xsd:string', 'nillable' => 'true'),     ) );  $server->wsdl->addcomplextype(     'returndataoutside',     'complextype',     'array',     'all',     '',     array(),     array(),     'tns:returndatainside' );  $server->register('test',     array('param_1' => 'xsd:int', 'param_2' => 'xsd:string'),     array('return' => 'tns:returndataoutside') );  function test($param_1, $param_2) {     $data = array(         'test' => array(             'message'               => 'string',             'value'                 => 'string',         ),     );      return $data; } 

my response looks that:

array (     [0] => array         (             [message] => string             [value] => string         )  ) 

so change 'test' key in response m.array ?

first of body of function incorrect.

$data[] = array( 'message' => 'string', 'value' => 'string', ); 

and answer on quastion is: soap not send keys multidimensional arrays.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -