Hey all!
I did the same example of web service in Yii Guide, and simply does not work, and got the error "SoapClient :: SoapClient (): php_network_getaddresses: getaddrinfo failed: Name or service not known".
If I call the url "http://myurl/mb/mobile.do" in browser it works fine, but if I call inside a view then I got the error.
I’m using “urlManager” it can be a problem?
My web service controller:
class MobileController extends CController
{
public function actions()
{
return array(
'mobile' => array(
'class' => 'CWebServiceAction',
),
);
}
/**
*
* @param string $param
* @return string
* @soap
*/
function getTest($param) {
return $param;
}
}
My call:
$client = new SoapClient('http://myurl/mb/mobile.do');
print $client->getTest('abc');
This seems so simple, what I’m doing wrong?
Thx.