Hi All,
I am new to YII framework, have to develop some webservice calls for my latest work.
I have to query a database and return few rows of data by webservice call. I am able to return array as object but I wish to send all the contents of array as <name>value</name>.
Any suggestions or clues of how to develop it is much appreciated.
Here is my soap-server:
/**
* @return array of stock and prices
* @soap
*/
public function getPrices( )
{
$prices=array('IBM'=>100, 'GOOGLE'=>350);
return ($prices);
}
Here is my soap-client, where i consume the webservice:
$client=new SoapClient(‘http://10.3.0.175/stock/quote’);
$rows = $client->getPrices();
foreach($rows as $key_name=>$key_value) {
echo " $key_name is $key_value "."</br>";
}
Thanks,
Jai