Yii Web 服务中的测试方法存在问题

发布于 2024-08-20 06:25:18 字数 1093 浏览 5 评论 0原文

这里有人可能熟悉 yii 框架中的 Web 服务吗?

我声明了以下测试方法:

/**
  * 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";
 }

但是当我尝试调用此方法时,我得到以下响应:

- - WSDL - SOAP 错误:正在解析 WSDL:无法从 'http:// 加载/sms.chillnethosting.co.za/index.php?r=sms/webservice' :需要开始标记,'<'未找到

当我调用 URL 时,会生成 WSDL: Web 服务 URL

有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

待天淡蓝洁白时 2024-08-27 06:25:18

我设法找出问题所在。 WSDL 似乎已缓存在我的浏览器中。我收到的错误是由于我之前输入的错误造成的,但浏览器缓存了它。

感谢您的所有回复。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文