flex - http service not working for parallel requests -


i using http service object make servlet requests inside method in flex. method being invoked simultaneously in parallel 2 events. see both requests have reached servlet, 1 returns result event. behaviours not consistent . possible parallel invocation of httpservice result in loss of requests? sure both requests have reached servlet , data returned it. result event not triggered in cases. in advance.

including code describe issue better.

please find method below. below method "callservlet" being invoked 2 separate events

private var httpobj:httpservice=new httpservice();

private function callservlet(text:string):void{

        alert.show(text);         httpobj = new httpservice();         httpobj.url=<servlet url>;         httpobj.method="post";         httpobj.resultformat="xml";         httpobj.contenttype="application/xml";         var requeststring:string=text;         httpobj.request=requeststring;         httpobj.addeventlistener(resultevent.result,onresultmethods);         httpobj.addeventlistener(faultevent.fault,onfaultmethod);         httpobj.send();      } 

each time call method, pass different "text" variable. can see alert displays 2 different texts send it. , explained earlier, both requests reach servlet , response sent servlet. result event "onresultmethod" invoked once.it doesnt invoke "faultonfaultmethod" either.

yes, have seen problem before, if making multiple requests flex, of them lost, in 3.0 times. browsers has way of stopping number of http calls, can allow maximum of 2 calls @ time(depends on browser), may chain requests 1 after other or use singleton manages calls.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -