AMF data is incomplete with Flex Service
I am bussy with a Flex Project with a data services. Flash builder installed Zend Framework with Zend_Amf.
When i run the project i get the error NetConnection.Call.Faile开发者_StackOverflow社区d: HTTP: Failed. With chalers i say that Zend_Amf give the error: AMF data is incomplete (0 bytes of 0 bytes). Please check the recording limits in the Recording Settings.
I don't know what the problem means. I have searched on google, but i haven't found a good result. The Flex project code is:
<?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>
The php code is:
<?php
class AuthService {
public function testme() {
return 'ik ben getest op'+date('d-m-Y H:i:s', time());
}
}?>
Please, help me!
This error normaly happens when there is an error thrown on the server side in a services that is not caught. Can you enable logging and see if there are any errors going on in your PHP? Your example code looks fine and should work.
I reinstalled the wamp server and flash builder, and that worked.
精彩评论