Try this, note, I'm calling a different method, "getSongs" which takes a band name as an argument <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" initialize="getFunky()"> <mx:Script> <![CDATA[
import mx.services.WebService; import mx.services.PendingCall; var myWebServiceObject:WebService; var MyPendingCallObject:PendingCall; public var debug_str:String = ""; function getFunky(){ d("WebService: " + WebService); var theURL = "http://radio.tapper.net/artist.cfc?wsdl"; myWebServiceObject = new WebService(theURL); MyPendingCallObject = myWebServiceObject.getSongs("beatles"); d("Made call..."); MyPendingCallObject.onResult = mx.utils.Delegate.create(this,showResults); MyPendingCallObject.onFault = mx.utils.Delegate.create(this,showFault); } function showResults(result:Array){ for(var i:Number =0;i<result.length;i++){ d(result[i].SONG); } } function showFault(fault){ d("fault: " + fault); for(var p in fault){ mx.core.Application.application.d(p + ": " + fault[p]); } } function d(o){ debug_str += o + "\n"; } ]]> </mx:Script> <mx:TextArea text="{debug_str}" width="400" height="300" /> </mx:Application> At 09:01 PM 11/10/2005, huhgawz wrote: >It works excelent!!!.... > >But how can i set the webservice params programatically? >I mean, if for example getCurrentSong(p1,p2) need a pair of parameters >or more....How can i set them via ActionScript? > > >--- In flexcoders@yahoogroups.com, "JesterXL" <[EMAIL PROTECTED]> wrote: > > > > Starting a new thread since we hijacked the other one. > > > > I tested this and it works in Flex 1.5 and Flash 8. > > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:Application > xmlns:mx="<http://www.macromedia.com/2003/mxml>http://www.macromedia.com/2003/mxml" > > initialize="getFunky()"> > > <mx:Script> > > <![CDATA[ > > > > import mx.services.WebService; > > import mx.services.PendingCall; > > > > var myWebServiceObject:WebService; > > var MyPendingCallObject:PendingCall; > > > > > > public var debug_str:String = ""; > > > > function getFunky() > > { > > d("WebService: " + WebService); > > var theURL = > "<http://radio.tapper.net/artist.cfc?wsdl>http://radio.tapper.net/artist.cfc?wsdl"; > > myWebServiceObject = new WebService(theURL); > > MyPendingCallObject = myWebServiceObject.getCurrentSong(); > > d("Made call..."); > > MyPendingCallObject.onResult = function(result) > > { > > mx.core.Application.application.d("result: " + result); > > for(var p in result) > > { > > mx.core.Application.application.d(p + ": " + result[p]); > > } > > } > > MyPendingCallObject.onFault = function(fault) > > { > > mx.core.Application.application.d("fault: " + fault); > > for(var p in fault) > > { > > mx.core.Application.application.d(p + ": " + fault[p]); > > } > > } > > } > > > > function d(o) > > { > > debug_str += o + "\n"; > > } > > > > > > ]]> > > </mx:Script> > > > > <mx:TextArea text="{debug_str}" width="400" height="300" /> > > </mx:Application> > > > > > > > > >-- >Flexcoders Mailing List >FAQ: ><http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt>http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt >Search Archives: ><http://www.mail-archive.com/flexcoders%40yahoogroups.com>http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > > >SPONSORED LINKS ><http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>Web > >site design development ><http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>Computer > >software development ><http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>Software > >design and development ><http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>Macromedia > >flex ><http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>Software > >development best practice > > >---------- >YAHOO! GROUPS LINKS > > * Visit your group > "<http://groups.yahoo.com/group/flexcoders>flexcoders" on the web. > * > * To unsubscribe from this group, send an email to: > * > <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED] > > * > * Your use of Yahoo! Groups is subject to the > <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service. > > >---------- ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/