Call WebService with ActionScript
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="initializeHandler(event)"> <mx:Script> import mx.rpc.soap.WebService; [Bindable] private var _statesService:WebService; private function initializeHandler(event:Event):void { _statesService = new WebService( ); _statesService.wsdl = "http://server.com/Service.php?wsdl"; _statesService.loadWSDL( ); _statesService.getCountries.send( ); } private function changeHandler(event:Event):void { _statesService.getStates.send(country.value); } </mx:Script> <mx:VBox> <mx:ComboBox id="country" dataProvider="{_statesService.getCountries.lastResult}" change="changeHandler(event)" /> <mx:ComboBox dataProvider="{_statesService.getStates.lastResult}" /> </mx:VBox> </mx:Application>