我正在使用Flash Builder 4.5和Flex 4.5語言。 我正在使用web服務來檢索json中調用.php的數據。Flex Webservice
<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對象。
如果我從代碼調用相同的webservice,它會返回一個(對象)#0,所以這是一個空的對象。沒有錯誤,只是一個空的對象。
任何人有一些提示?
它是否正在訪問Web服務?是否有任何服務器日誌更新? – kbgn