|
Okay, so here is my code. I will not post the entire
application, but here are the relevant pieces. Whenever many clicks on the
ObjectComp component are performed, the web service connection returns
Connection Reset. I’m not sure if this is the web service doing the
connection drop or if it is Flex. 1. The web service definition: <mx:WebService id="metadataWS" wsdl="http://localhost/MetadataServices.asmx?WSDL"
fault="faultHandler(event.fault.faultstring)"
concurrency="single"> <mx:operation
name="GetMetadata" result="onMetadataResponse()" > <mx:request> <obj>{objectModel.ParentObject}</obj> </mx:request> </mx:operation> </mx:WebService> 2. My tile component’s definition: <ObjectComp id="oc" index="{allObjects.currentIndex}"
imageSource="{allObjects.currentItem.ID}" mouseDown="objClick(event.target.index)"
borderStyle="solid" /> 3. The relevant ActionScript: var waitResult:Boolean = false; private function onMetadataResponse():Void { waitResult = false; } function objClick(index):Void { if (waitResult == false) { setDetail(index); waitResult = true; metadataWS.GetMetadata.send(); } else { mx.controls.Alert.show("Wait
until previous request is returned!", "DAM System") } } So, when the user clicks on the object (the ObjectComp
component is repeated in a Tile component), the waitResult flag is set to True.
So, until the result is returned, the subsequent web service calls are not
performed. I don’t like this code. I would prefer to not have it in at
all. This is what I would prefer, but it doesn’t work either: 1. Web service: <mx:WebService id="metadataWS" wsdl="http://localhost/MetadataServices.asmx?WSDL"
fault="faultHandler(event.fault.faultstring)"
concurrency="single"> <mx:operation
name="GetMetadata"> <mx:request> <obj>{objectModel.ParentObject}</obj> </mx:request> </mx:operation> </mx:WebService> 2. Tiled component: <ObjectComp id="oc" index="{allObjects.currentIndex}"
imageSource="{allObjects.currentItem.ID}" mouseDown="objClick(event.target.index)"
borderStyle="solid" /> 3. ActionScript: function objClick(index):Void { setDetail(index); metadataWS.GetMetadata.send(); } This is puzzling me. Any ideas?? Thanks, DS --- In [email protected], "Tracy Spratt"
<[EMAIL PROTECTED]> wrote: > Yes, if that is ok with the users. You would want to
have some visual > clue that the click functionality was inoperative, else
they would be > clicking uselessly or multiple times when they
shouldn't. And I might > think again about using the asynchronous nature of the
dataservice calls > to allow the user to get ahead of the processing. > > But of course, we are not solving the real problem. I
know I am > blasting 10-15 consecutive calls at processor speedto
my HTTPService > without problem. > > -----Original Message----- > From: dustin_speer [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 10, 2005 11:51 AM > To: [email protected] > Subject: [flexcoders] Re: WebService Connection Keeps
Resetting... ? > > > > That would work, but something even simpler such as
disabling the > click event while waiting for a response would suffice. > DS > > --- In [email protected], "Tracy
Spratt" <[EMAIL PROTECTED]> > wrote: > > Suppose you created a stack(array) of requests,
then sent the first > one, > > then in the return event handler, pop the next
item off the stack > and > > sent that? > > > > > > > > -----Original Message----- > > From: dustin_speer [mailto:[EMAIL PROTECTED] > > Sent: Thursday, February 10, 2005 9:58 AM > > To: [email protected] > > Subject: [flexcoders] Re: WebService Connection
Keeps Resetting... ? > > > > > > > > Let me explain my app first. I have a custom
component repeated in > a > > Tile. Whenever the user clicks on one of the
objects, I make a web > > service request to return info about that object
(much like a > > shopping cart program, but my app is not
e-commerce). The > connection > > to my web service seems to be resetting whenever
the user clicks 5 > or > > 6 times in a row before the first response comes back.
> > > > So, how can I keep subsequent service requests
from being executed > > while I am waiting for a response from a web
service? > > > > By the way, I am using: > > Java 1.4.2 > > Tomcat 5.0.28 > > > > Thanks, > > DS > > > > --- In [email protected], Matt Chotin
<[EMAIL PROTECTED]> wrote: > > > Have you turned on the debugging to see if
there's anything > > specific that > > > seems to be causing the disconnect? What is
your Java version > and > > what app > > > server are you using? > > > > > > > > > > > > Matt > > > > > > > > > > > > _____ > > > > > > From: Speer, Dustin [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, February 09, 2005 12:50 PM > > > To: [email protected] > > > Subject: [flexcoders] WebService Connection
Keeps Resetting... ? > > > > > > > > > > > > When I load and run my flex app, the
connection to my > backend .NET > > web > > > service keeps resetting after about 30
seconds or less. Any ideas > > how I can > > > handle these connections better? > > > > > > DS > > > > > > > > > > > > Dustin Speer > > > > > > Special Projects Analyst > > > > > > Vestcom > > > > > > 7304 Kanis Rd > > > > > > > > > > > > Office 800.264.0965 X 678 > > > > > > Fax 501.664.3934 > > > > > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > Yahoo! Groups Links Dustin Speer Special Projects Analyst Vestcom Office 800.264.0965 X 678 Fax 501.664.3934 Mobile 501.952.8972 |

