I have a web application with a module called softwareAdmin. I would like to create a webservice within it to get an activation key for a software. Since I am new to webservices in YII, I started by creating the test webservice described in the documentation. Then I try to run it:
$client = new SoapClient('http://localhost/index.php?r=softwareAdmin/stock/quote');
echo $client->getPrice('GOOGLE');
I get the following error:
SoapClient::SoapClient(http://localhost/index.php?r=softwareAdmin/stock/quote): failed to open stream: HTTP request failed! HTTP/1.1 500 CDbException
But then I move it out of the module and try to call it again:
$client = new SoapClient('http://localhost/index.php?r=stock/quote');
echo $client->getPrice('GOOGLE');
And it works. I am now wondering why it doesn’t work when it is placed inside the module. Anyone that can help me with this one?