Can nusoap returns arrray of string ?

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-04-11T12:15:14Z Indexed on 2010/04/11 12:23 UTC
Read the original article Hit count: 500

Filed under:
|

Hi all,

I would like to return an array of string in my web services

I've tryed :

<?php
require_once('nusoap/nusoap.php');

$server = new soap_server();
$server->configureWSDL('NewsService', 'urn:NewsService');
$server->register('GetAllNews', 
 array(),
 array('return' => 'xsd:string[]'),
 'urn:NewsService',
 'urn:NewsService#GetAllNews',
 'rpc',
 'literal',
 ''
);

// Define the method as a PHP function
function GetAllNews()
{
 $stack = array("orange", "banana");
 array_push($stack, "apple", "raspberry");
 return $stack;
}

but it doesn't work. What is the correct syntax for that ?

Thanks in advance for any help

© Stack Overflow or respective owner

Related posts about nusoap

Related posts about web-services