Flex Service的AMF数据不完整

时间:2010-04-28 15:18:51

标签: php flex zend-framework flash-builder zend-amf

我对带有数据服务的Flex项目非常热心。 Flash Builder使用Zend_Amf安装了Zend Framework。

当我运行项目时,我收到错误NetConnection.Call.Failed:HTTP:失败。对于chalers,我说Zend_Amf给出了错误:AMF数据不完整(0字节的0字节)。请在录制设置中查看录制限制。

我不知道问题意味着什么。我在谷歌搜索过,但我没有找到好结果。 Flex项目代码是:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
               xmlns:s="library://ns.adobe.com/flex/spark" 
               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:authservice="services.authservice.*">
    <fx:Script>
        <![CDATA[
            import mx.controls.Alert;

            protected function click_me_clickHandler(event:MouseEvent):void
            {
                text.text += "Test started";
                testmeResult.token = authService.testme();
                text.text += testmeResult.lastResult
                text.text += "Test ended";
            }

        ]]>
    </fx:Script>
    <fx:Declarations>
        <s:CallResponder id="testmeResult"/>
        <authservice:AuthService id="authService" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <s:Button x="124" y="85" label="Click Me!" id="click_me" click="click_me_clickHandler(event)"/>
    <s:RichText x="58" y="114" width="238" height="182" id="text"/>
</s:Application>

php代码是:

<?php
class AuthService {
    public function testme() {
        return 'ik ben getest op'+date('d-m-Y H:i:s', time());
    }
}?>

拜托,帮助我!

2 个答案:

答案 0 :(得分:1)

当未捕获的服务中的服务器端抛出错误时,通常会发生此错误。您是否可以启用日志记录并查看PHP中是否存在任何错误?您的示例代码看起来很好,应该可行。

答案 1 :(得分:0)

我重新安装了wamp服务器和Flash构建器,这很有效。