【发布时间】:2011-10-25 15:16:00
【问题描述】:
我使用的是 Flash Builder 4.5 和 flex 4.5 语言。 我正在使用网络服务来检索调用 .php 的 json 中的数据。
<webservice:Webservice id="webservice" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
<s:CallResponder id="testResult" result="onTestResult(event)"/>
...
private function onTestResult(e:ResultEvent):void{
Alert.show(ObjectUtil.toString(testResult.lastResult));
}
在 Flash Builder 的“测试操作”窗口中,我进行了调用,返回的是一个由数组构成的 json 对象。
如果我从代码中调用相同的 web 服务,它会返回一个 (object)#0,因此是一个空对象。没有错误,只是一个空对象。
有人有什么建议吗?
【问题讨论】:
-
它是否在访问网络服务?是否有任何服务器日志更新?
标签: web-services actionscript-3 apache-flex flash-builder