I created a form that submitted to the same page that the HTTPService sends to. It inserts fine. The variables are there, I generated a document with them. What needs to be sent back and how? This is the error I am getting:
faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: https://ummciisdevweb22.med.umich.edu/videotracking/tracker.cfm"]. URL: https://ummciisdevweb22.med.umich.edu/videotracking/tracker.cfm' ---------------------------------------- From: "Tracy Spratt" <[EMAIL PROTECTED]> Sent: Monday, December 08, 2008 1:26 PM To: [email protected] Subject: RE: [flexcoders] Re: Desperate Times...Desprate Messures: What is sent by HTTPRequest? That means Flex is sending the call with the data corrrectly. So then where is the error happening? Between CF and the Database? Does the CF Insert query work if you hard code the values? What IS the error? Send something back to Flex. Hard code it if necessary. I have never done either HTTPService or WebSevice calls without some return data. Maybe flex is trying work with a null. I advise setting resultFormat="e4x" for either RPC call types. I always send back a "status" node to flex. Tracy ---------------------------------------- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of wkolcz Sent: Monday, December 08, 2008 3:56 PM To:[email protected] Subject: re: [flexcoders] Re: Desperate Times...Desprate Messures: What is sent by HTTPRequest? Ok, I see what is being sent. If I dump them to a pdf, I can see them fine. <cfdocument format="PDF" overwrite="yes" filename="whatyousee.pdf"> FORM: <cfdump var="#form#" /> <cfoutput> #form.duration# #form.action# #form.source# </cfoutput> </cfdocument> But when I just submit them to a page with just an insert Query, using the form.variable, I get an error! This is making NO sense. <cfquery name="create" datasource="webstatistics-test"> INSERT INTO tracker(clickCount, duration, action, dept, videoFile, datePlayed) VALUES(1, #form.duration#, '#form.action#', 'PRMC', '#form.source#', #Now()#) </cfquery> Is Flex waiting for something else? Do I need to send something back. I just want to insert a counter into the database each time the user leaves the page or clicks the stop button..... ---------------------------------------- From : "valdhor" <[EMAIL PROTECTED]> Sent: Monday, December 08, 2008 12:50 PM To: [email protected] Subject: [flexcoders] Re: Desperate Times...Desprate Messures: What is sent by HTTPRequest? Grab a copy of Charles (http://www.charlesproxy.com). This will show you exactly what is being sent to your server. --- In [email protected], "wkolcz" <[EMAIL PROTECTED]> wrote: > > I am just trying to send 4 parameters over to a CFC or CFM page to insert into the database and both WebService and HTTPRequest are giving me fits. > > Ok here is the scenerio: > When the user watches a video, it starts a timer, when the user either exits the page or clicks the 'stop' button it triggers a function that sends out 3 pieces of info: what video, how long, and whether they clicked stop or left. I am packaging that information into an Object and sending it to a .cfm page with a query on it, ready to insert. > > What exactly is my .cfm page 'seeing' sent to it? Are they form., url., or just the stuct name? > > Here is my AS code: > trackInfo.duration = myTimer.currentCount; > trackInfo.action = "Video Stopped"; > trackInfo.source = source; > var service:HTTPService = new HTTPService(); > service.url = "https://ummciisdevweb22.med.umich.edu/videotracking/tracker.cfm"; > service.method = "POST"; > service.addEventListener(ResultEvent.RESULT, countHandler); > service.addEventListener(FaultEvent.FAULT, alertFault); > service.send(trackInfo); > > How should I constuct the query on the tracker.cfm page? Something like: > > <cfquery name="countIt" datasource="#request.dsn#"> > Insert Into tracker (clickCount, duration, action, videoFile, datePlayed) > VALUES(1, #trackInfo.duration#, '#trackInfo.action#', '#trackInfo.source#', #Now()#) > </cfquery> >

