When does this error happen?  When the send is called, or in the fault
handler?  (I am not good enough at reading stack traces to tell)

 

If the former, suspect the outgoing xml.  If the latter, suspect the
service.

 

Tracy

 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jason B
Sent: Monday, January 05, 2009 11:21 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: error in HTTPService

 

Another option is to bypass flex and use the url directly in the
browser or a simple script to post to the url with the xml data to
find out details on whats being returned to flex and if its valid XML

--- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "Tracy Spratt" <tspr...@...> wrote:
>
> Also, a declaratively created request object is very difficult to
debug.
> I suggest you build that XML in an as function, then trace it out and
> verify it is valid as a whole. I suspect that you have invalid xml the
> second time.
> 
> 
> 
> Using a utility will also let you do this, but simply tracing the XML
> might be simpler.
> 
> 
> 
> Tracy
> 
> 
> 
> ________________________________
> 
> From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
] On
> Behalf Of Jason B
> Sent: Monday, January 05, 2009 10:56 AM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> Subject: [flexcoders] Re: error in HTTPService
> 
> 
> 
> show us your result="handleSimUpdateResult(event)" function
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
<mailto:flexcoders%40yahoogroups.com>
> , "weezee49" <rainyglade@> wrote:
> >
> > I have the following HTTPService:
> > 
> > <mx:HTTPService id="svcSimulationUpdate" 
> > contentType="application/xml" 
> > url="http://localhost:3000/simulations/
<http://localhost:3000/simulations/> 
> <http://localhost:3000/simulations/
<http://localhost:3000/simulations/> > 
> > {userModelsCB.selectedItem.id}?_method=put"
> > resultFormat="e4x" 
> > method="POST" 
> > result="handleSimUpdateResult(event)">
> > <mx:request xmlns="">
> > <data>
> > <simulation>
> > <name>{runControlBox.simNameTI.text}</name>
> > <desc>{runControlBox.descTI.text}</desc>
> > <run_length>{runControlBox.runLengthTI.text}</run_length>
> > <time_units>{getTimeUnits
> > (runControlBox.timeUnitsCB.selectedIndex)}</time_units>
> > </simulation>
> > <load>
> > <simulation_id>{_selectedSim.id}</simulation_id>
> > <name>Arrival1</name>
> > <dist_type>{getDistName
> > (loadBox.loadDistCB.selectedIndex)}</dist_type>
> > <param1>{loadBox.loadParam1TI.text}</param1>
> > <param2>{loadBox.loadParam2TI.text}</param2>
> > <param3>{loadBox.loadParam3TI.text}</param3>
> > <time_units>{getTimeUnits
> > (loadBox.timeUnitsCB.selectedIndex)}</time_units>
> > </load>
> > <resource>
> > <name>Server1</name>
> > <simulation_id>{_selectedSim.id}</simulation_id>
> > <capacity>{rscBox.capacityTI.text}</capacity>
> > <dist_type>{getDistName
> > (rscBox.distributionCB.selectedIndex)}</dist_type>
> > <param1>{rscBox.distParam1TI.text}</param1>
> > <param2>{rscBox.distParam2TI.text}</param2>
> > <param3>{rscBox.distParam3TI.text}</param3>
> > <time_units>{getTimeUnits
> > (rscBox.timeUnitsCB.selectedIndex)}</time_units>
> > </resource>
> > <buffer>
> > <name>Queue1</name>
> > <simulation_id>{_selectedSim.id}</simulation_id>
> > <capacity>{queueBox.capacityTI.text}</capacity>
> > </buffer>
> > </data>
> > </mx:request>
> > </mx:HTTPService>
> > 
> > This service works perfectly the first time - my data base is 
> > updated correctly and everything is fine. However, if I try to run 
> > the service again, I get a "Thread suspended" with an error that 
> > starts out like this:
> > 
> > undefined
> > at flash.xml::XMLNode()
> > at flash.xml::XMLDocument/createElement()
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> >
[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:133]
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> >
[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:146]
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> >
[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:146]
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> >
[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:146]
> > ... 
> > 
> > I have verified that the fields used in the <mx:request> have the 
> > correct data in them just before the send() call.
> > 
> > Why does the service work okay the first time but then die the 2nd 
> > time?
> > 
> > Thanks,
> > LG Rains
> >
>

 

Reply via email to