【发布时间】:2011-12-07 20:30:06
【问题描述】:
我正在尝试使用 yii 创建一个简单的示例 Web 服务。我关注了这些directions,但是当我尝试访问 WSDL 以查看 yii 生成的内容时出现错误。访问 WSDL http://localhost/mywebapp/index.php/L1Folio/folio
错误:
XML Parsing Error: junk after document element
Location: http://localhost/paperless_admin/index.php/L1Folio/folio
Line Number 4, Column 1:
<table class="yiiLog" width="100%" cellpadding="2" style="border-spacing:1px;font:11px Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;color:#666666;">
^
代码:
L1FolioController.php:
<?php
class L1FolioController extends CController
{
public function actions()
{
return array(
'folio'=>array(
'class'=>'CWebServiceAction',
),
);
}
/**
* @param string the folio
* @return string the statement
* @soap
*/
public function sendFolio($folio)
{
return 'it works';
}
}
感谢您的帮助。
【问题讨论】:
标签: php xml web-services wsdl yii