获取网络发布的webservice
wsdl:
GetMonths.mxml
layout="vertical"
verticalAlign="middle"
backgroundColor="white" viewSourceURL="srcview/index.html">
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
import mx.utils.ObjectUtil;
private var startTime:int;
private var endTime:int;
private function button_click():void {
webService.getMonths.send();
startTime = getTimer();
lbl.text = "";
}
private function getMonths_result(evt:ResultEvent):void {
textArea.text = ObjectUtil.toString(evt.result);
calcTime();
}
private function getMonths_fault(evt:FaultEvent):void {
Alert.show(evt.type);
calcTime();
}
private function calcTime():void {
endTime = getTimer();
lbl.text = "total time: " + (endTime - startTime) + "ms";
}
]]>
wsdl="">
resultFormat="object"
result="getMonths_result(event);"
fault="getMonths_fault(event);" />
label="get months from web service"
click="button_click();" />
editable="false"
width="100%"
height="100%" />
阅读(1214) | 评论(0) | 转发(0) |