I can pull up the wsdl just fine, but I can't seem to get my tester function to work properly… I get a blank return, have any of you had this issue before?
/**
* test yii webservice
*
* @return string hello world
* @soap
*/
public function getTest()
{
return "some text here..";
}
public function actionTest()
{
$client = new SoapClient('http://valhalla-studios.com/VStudios_Yii/flex/testing');
echo $client->getTest();
}
what version of php are you using? also, what os? My situation might be a little different than yours, I can't switch out my version of PHP so I had to build the soap.so from another version and add it to mine (saw it on a guide somewhere, worked for everyone that used it).
SoapClient::SoapClient(http://valhalla-studios.com/VStudios_Yii/flex/testing) [<a href='soapclient.soapclient'>soapclient.soapclient</a>]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
Probably. I hadn't encountered this before, so I can't help you much. My only ussgestion is to check apache's error log, and also turn off any apache/php filters.
It definitely seems to be a sever configuration issue, though, since this demo works in many server configurations I tested.
The file /etc/hosts overrides DNS lookup for any domains/addresses that are defined in it. Your /etc/hosts file now has one line:
127.0.0.1 localhost localhost.localdomain
This says "if you're trying to connect to the address localhost or localhost.localdomain, connect to IP address 127.0.0.1". IP address 127.0.0.1 is (typically) the loop-back to the server, and if you enter localhost in your web browser, that's where you should end up.
So, the code running on the server would request valhalla-studios.com, and /etc/hosts would redirect the call to IP address 127.0.0.1, the loop-back IP. That messed up the code trying to make a real connection to the web server.