xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
id="webService" useProxy="false" showBusyCursor="true" wsdl="http://localhost:8080/evaluation/QueryActionPort?wsdl">
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
private function init():void
{
webService.loadWSDL();
}
private function onResult(event:ResultEvent):void
{
var HeavyMetal:Object;
HeavyMetal = event.result;
//Alert.show(event.result.toString());
Alert.show(HeavyMetal.geometry.y);
}
]]>
Java类中的queryByObjectid方法返回一个对象,在Actionscript中可以直接接受返回的对象。