Highlighted

consecutive calls to: <webservice>.send()

Avatar

Guest

31-07-2008

Hello forum,



I'm new at Flex and ActionScript and I am in trouble with Web
Service Consumption. In my application, I need to call several
times to the same Web Service but with one different request
parameter.



The thing is, that once performed all the .send(), the
resultHandler is called, but always with the last value I gave to
that request parameter, so the result is always the same.



I paste some of the code:



[..]

employeeID = "00005001";

wsGetEmployeeData.EmployeeGetdata.send();

employeeID = "00005002";

wsGetEmployeeData.EmployeeGetdata.send();

[..]

private function
resultGetEmployeeData(event:ResultEvent):void{

xmlEmpData= wsGetEmployeeData.EmployeeGetdata.lastResult;

[..]

<mx:WebService id="wsGetEmployeeData" wsdl="url">

<mx:operation name="EmployeeGetdata"

resultFormat="e4x"

result="resultGetEmployeeData(event);"

fault="faultGetEmployeeData(event);">

<mx:request>

<EmployeeId>{employeeID}</EmployeeId>

</mx:request>

</mx:operation>

</mx:WebService>

[..]



Does anyone have an idea of how to call the Same Webservice?



Thank you,

toni