views:

259

answers:

2

Hi There,

Is there anyone here who might be familiar with web services in the yii framework?

I declared the following test method:

/**
  * Send a single SMS message
  * 
  * @param string $username Username
  * @param string $password Password
  * @param string $identifier Valid Identifier to use
  * @param string $mobileNumber Mobile Number to send message to
  * @param string $message Message to send
  * @return string 'OK' on success, error message on failure
  * @soap
  */
 public function singleSms($username, $password, $identifier,$mobileNumber, $message){
  return "username=$username, pwd=$password, source=$identifier, mobno=$mobileNumber, msg=$message";
 }

But when I try to call this method I get the following response:

− − WSDL − SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://sms.chillnethosting.co.za/index.php?r=sms/webservice' : Start tag expected, '<' not found

The WSDL generates when I call my URL: Web Service URL

Any Ideas?

A: 

Have you declared your web service action?

http://www.yiiframework.com/doc/guide/topics.webservice#declaring-web-service-action

pestaa
A: 

I managed to figure out what the problem was. It seems that the WSDL was cached in my browser. The error I received was due to a typo I made earlier, but the browser cached it.

Thanks for all the replies.

Conrad