After a bit of a struggle, I've managed to get the flex WebService class working with my Flash CS4 project (thanks to this post). The problem I'm having is that If I do two calls in rapid succession to different methods of the same WebService, then I can't distinguish the results when they come back. In my project, my function onWebServiceData would trigger twice, but I couldn't tell which time was in response to Method1 and which was in response to Method2.

Here is a stripped down version of my code:
PHP Code:
package {
    
import flash.display.*;
    
import flash.events.Event;
    
import flash.events.MouseEvent;
    
import flash.net.URLRequest;
    
import flash.net.URLLoader;
    
import flash.utils.ByteArray;

    
import mx.rpc.soap.*;
    
import mx.core.*;
    
import mx.rpc.events.*;
    
import fl.data.DataProvider;
    
    public class 
Test extends Sprite {

        private var 
ws:WebService;


        public function 
Test() {
            
ws = new WebService();
            
ws.wsdl "http://somesite.com/?wsdl";
            
ws.addEventListener(LoadEvent.LOADonWSDL);
            
trace('loading wsdl...');
            
ws.loadWSDL();
        }


        private function 
onWSDL(event:Event):void {
            
trace('wsdl load complete!');
            
ws.addEventListener(FaultEvent.FAULTonWebServiceFault);
            
ws.addEventListener(ResultEvent.RESULTonWebServiceData);
            
ws.Method1('foo');
            
ws.Method2('bar');
        }
        
        private function 
onWebServiceFault(event:FaultEvent):void {
            
trace('fault!:' event);
        }
        
        private function 
onWebServiceData(event:ResultEvent):void {
            
trace('onWebServiceData running');
            
trace(event);
            
trace('event properties:');
            for(var 
item in event.result) {
                
trace(item'=' event.result[item]);
            }
        }
        
        
    }

Any suggestions about how to sort this out would be much appreciated.