4 Replies Latest reply on Jan 23, 2008 8:11 PM by theflxkid

    Multiple concurrent webservice calls to same operation

      I'm having a problem trying to call the same web service operation twice with different parameters. The call is being executed twice (I'm passing token data to differentiate the calls in the event handler), but the second call's parameters are overwriting the first ones. Here is the code:

      wsCodeList["GetTupleList"].arguments.TupleName = "BUSTYPE";
      var call:Object = wsCodeList["GetTupleList"].send();
      call.destination = "busType";

      wsCodeList["GetTupleList"].arguments.TupleName = "ENTTYPE";
      call = wsCodeList["GetTupleList"].send();
      call.destination = "entityType";


      <mx:WebService id="wsCodeList"
      wsdl=" http://simulacrum.hallmarkins.net/ProgramQuoter/codeList.wso?wsdl"
      useProxy="false" result="onCodeListResult(event)">
      <mx:operation name="GetTupleList" resultFormat="e4x"/>


      private function onCodeListResult(oEvent):void
      var call:Object = oEvent.token;
      var xmlResult:XMLList = oEvent.result;
      if (call.destination == "busType")
      busType.dataProvider = xmlResult..mspace::description;
      if (call.destination == "entityType")
      entityType.dataProvider = xmlResult..mspace::description;
      I'm getting back only the expected result for the call with TupleName "ENTTYPE" twice. So it seems that the parameter is getting overwritten before the call has gone out. What am I doing wrong?