SOAPParam - Does it possible?

From: Date: Fri, 09 Jul 2010 23:08:02 +0000
Subject: SOAPParam - Does it possible?
Groups: php.general 
Request: Send a blank email to php-general+get-306810@lists.php.net to get a copy of this message
Hi, I'm creating a wsdl server but I have one doubt about the soapparam::soapparam(). I want to know how to return several parameters using the soapparam::soapparam(). I'm doing this: class MyApi implements API { public function Send($param) { $resp = array('resposta' => 'works', 'events' => array ('from' => 'smith', 'text' => 'Hello world', 'to' => 'john')); return new SoapParam($resp, 'events'); } Looking in the php.net Docs the soapparam() has this definition: *SoapParam::SoapParam* ( mixed<http://br3.php.net/manual/en/language.pseudo-types.php#language.types.mixed> $data , string $name ) *data* The data to pass or return. This parameter can be passed directly as PHP value, but in this case it will be named as *paramN* and the SOAP service may not understand it. *name* The parameter name. But How can I return the entire array: $resp = array('resposta' => 'works', 'events' => array ('from' => 'smith', 'text' => 'Hello world', 'to' => 'john')); ? Looks this wsdl schema in this email I think you will understand more about my problem. Thanks Augusto Morais

« previous php.general (#306810) next »