[flexcoders] error in HTTPService
I have the following HTTPService: mx:HTTPService id=svcSimulationUpdate contentType=application/xml url=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 nameArrival1/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 nameServer1/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 nameQueue1/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
[flexcoders] Error Codes HTTPService
Hey there. The issue I'm having, is that our company's back-end team (I'm on the front-end team) under certain conditions sends 404 codes back, along with a response message for us to parse such that we can display the appropriate explanatory message to the user. These messages are stored and distributed via the back-end along with the response to certain requests. Now, this is all fine and dandy, and I might add, a fairly industry-standard form of communication between services, however Flex disregards the response the server made, and takes it upon itself to construct a FaultEvent of its own which contains its own faultCode, faultDetail, and faultMessage. This is of no help to the user, and greatly constricts the, *ahem*, flexibility of the application. In an attempt to work around this shortcoming, the backend has modified its responses to fall within the HTTP 200 range, which we assumed would be acceptable as Flex appears to disregard other error codes. Such does not seem to be the case, even codes such as 201, 203 and 204, prompt the same behavior (FaultEvent). The HTTPService object should not take it upon itself to disregard important information returned by the backend. The HTTPService should provide the means to allow for the returned response to be retained (I don't see why it can't do this regardless of the event it returns. i.e. keep the response in the FaultEvent.) It would be great if Adobe would provide the source-code to HTTPService such that an effective extension or overriding of the class is possible by individual developers. Failing that, do any of you have any solutions and/or suggestions, or can you confirm/deny my claims? Gracias --
[flexcoders] Error with HTTPService POST making malformed element
I am new to Flex and need help with getting the appropriate containers set up to send GOOD data from a swf to PHP to do the write to an XML file. // The beginning of the error is... [RPC Fault faultString=Error #1090: XML parser failure: element is malformed. // The beginning of the string that gets passed according to the Apache access log... ?param2=%3Cplayer%20type%3D%22r%22%20id%3D%228326%22%2 //This part works fine if I am passing a string: mx:HTTPService id=myService url=saveResults.php resultFormat=e4x / // myService.cancel(); var params:XML = new XML(); var n:Number = 0; for (var players:String in xfrObj){ params[param+n] = xfrObj[player+n].toString(); trace(params[param+n]); n=n+1; } myService.send(params);
[flexcoders] error with HTTPService
Hello, I'm trying to bind the returned results from a ComboBox to a url in HTTPService. Flex returns a Value must be quoted error with this statement: mx:HTTPService id=productService url={appName.SelectedItem.url} result=productServiceResultHandler(event) showBusyCursor=true/ Here's my code for theComboBox. mx:ComboBox id=appName styleName=glass width=161 change=productService.send(); mx:dataProvider mx:Array mx:Object label=â12.5V HF SSBâ url=âdata/125-hf-ssb.xml?filter=12vhgssbâ/ mx:Object label=â28V HF SSBâ url=âdata/28v-hf-ssb.xml?filter=28vhfssbâ/ mx:Object label=â50V HF SSBâ url=âdata/50v-hf-ssb.xml?filter=50vhfssbâ/ mx:Object label=âCell Basestationâ url=âdata/cell-basestation.xml?filter=cellbasestationâ/ mx:Object label=âCellular Mobileâ url=âdata/cellular-mobile.xml?filter=cellularmobileâ/ mx:Object label=âDME TACANâ url=âdata/dme-tacan.xml?filter=dme-tacanâ/ /mx:Array /mx:dataProvider /mx:ComboBox Can't seem to find much in the docs about this, except that url must be quoted. What am I doing wrong? Thanks in advance.
[flexcoders] Error: Flex HTTPService (JSP) and ColdFusion
I've isolated the HTTPService request errors in the Flex examples to an issue with ColdFusion's integrated JRun wanting to take over jsp execution. Changing AddHandler in Apache's configuration didn't make a difference, however, commenting out the following lines works: JRunConfig Serverstore /opt/coldfusion/runtime/lib/wsconfig/1/jrunserver.store JRunConfig Bootstrap 127.0.0.1:51010 Add either line back in and the HTTP server error pops up again. Pretty sad that Flex and CF just will not play nice together. We have a license for a full install of JRun, so I'll be testing that later today after I downgrade the server from JRE1.5 to 1.4 so I can install JRun. Yahoo! Groups Sponsor ~-- Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM ~- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/