The guy at WellConsdered.be made a WebService package for AS3. I've only done testing with it, but it appeared in a book and it seems to work fine.
Here is a link to the site where you can get the code:
WellConsidered.be
This is an example code. Just put this on the main timeline frame one:
Code:import be.wellconsidered.services.WebService; import be.wellconsidered.services.Operation; import be.wellconsidered.services.events.OperationEvent; var ws = new WebService("http://www.webservicex.net/WeatherForecast.asmx?wsdl"); var op:Operation = new Operation(ws); op.addEventListener (OperationEvent.COMPLETE, onResult); op.addEventListener (OperationEvent.FAILED, onFault); op.GetWeatherByPlaceName ("new york"); function onResult (e:OperationEvent):void { for (var prop in e.data){ trace (e.data[prop]); } } function onFault (e:OperationEvent):void { trace (e.data); }




Reply With Quote