View Full Version : HTTPService Desperation
dColumbus
03-14-2009, 12:17 AM
This is a desperate situation for me...
I have a few HTTPService's ready to be called when necessary... however, I have noticed that after about 5 minutes, the service (any of them) is sent again. I have tried to implement concurrency="single" and also a httpService.disconnect(); after each of the responses... no go. This is so frustrating! This is a VERY desperate situation for me. I would appreciate some knowledge!
wvxvw
03-14-2009, 12:33 AM
Can you show the code where it may happen?
dColumbus
03-14-2009, 12:41 AM
<mx:HTTPService id="myService"
url="/webservices/assetDelete.cfm"
result="handleRemoveVideoPlain(event)"
fault="handleRemoveVideoFault(event)"
resultFormat="text" concurrency="single">
That's what my HTTPService looks like. Im calling myService.send();. That's honestly it... there are a few popups that happen based on the response, but the bottom line is that this service will call itself again and again.
wvxvw
03-14-2009, 11:31 AM
Huh, this is really very strange... But, for the sake of checking you could do something like this:
extend the HTTPService put something like this into overriden send() method:
public override function send(parameters:Object = null):AsyncToken
{
// This will show you the stack trace of where the call originated from
Alert.show(new Error().getStackTrace());
super.send(parameters);
}
And use your extended HTTPService instead of your's.
This will show you what has caused that additional call.
Sly_cardinal
03-14-2009, 12:03 PM
Where is the HTTPService being defined? Is it in an MXML component that gets instantiated multiple times?
wvxvw
03-14-2009, 01:37 PM
You have 2 HTTPService classes, one in mx package and another in rpc package (the latter is said to be more advanced, but I don't really know what the difference is). But for that case it doesn't really matter, you can extend whichever one you like and just use the extended class where you used HTTPService before.
I.e. something like this:
package my.components {
public class ExtendedHTTPService extends HTTPService {
....
// your code here
}
}
and then, where you used HTTPService you'd do:
<mx:Application .... xmlns:my="my.components.*">
<my:ExtendedHTTPService .../>
.....
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.