Returning An Array of Objects in PHP Web Service
I want to return an array of article objects in a PHP web service, using nuSOAP v 1.114. This is how I set up the WSDL: $server->wsdl->addComplexType( 'ArticleType', 'complexType', 'struct', 'all', '', array('articleId' => array('name'=>'articleId', 'type'=>'xsd:int'), 'heading' => array('name'=>'heading', 'type'=>'xsd:string'), 'text' => array('name'=>'text', 'type'=>'xsd:string') ) ); $server->wsdl->addComplexType( 'ArrayOfArticleType', 'complexType', 'array', '', 'SOAP-ENC:Array', array(), array( array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:ArticleType[]' // ArticleType[] )