Figured it out. Wrapped the query in a try/catch that outputted to a pdf. It 
was the weirdest thing..same values hardcoded and sent, but the sent ones were 
truncated..

Now I just need to figure out how to write a javascript that calls to Flex and 
invokes a function on window.close...stay tuned.

Than you for your help Tracy.

----------------------------------------
From: "Tracy Spratt" <[EMAIL PROTECTED]>
Sent: Monday, December 08, 2008 4:53 PM
To: [email protected]
Subject: RE: [flexcoders] Re: Desperate Times...Desprate Messures: What is sent 
by HTTPRequest? 

Also, have you yet managed to get Flex to communicate
with the server at all?   If not, that is job 1.   I'd advise simplifying 
things as much
as possible, like creating a simple page that accepts an HTTPService request (no
parameters) and returns a hard coded value (I advise xml).   Then, make that 
page an "echo"
page, that takes a single querystring parameter and returns it to the Flex
client.  Test that from a browser before you try it from Flex (using GET).  Then
use an htm form to submit the parm, then POST from Flex..   When you get that, 
you will be pretty much
in business.   Ah, also try it without https.  There are
some considerations with HTTPS, particularly with serving the Flex app from
http, but the data from https.  Google that.   Tracy    
----------------------------------------
 From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tracy 
Spratt
Sent: Monday, December 08, 2008
7:35 PM
To:[email protected]
Subject: RE: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest?   That error 
typically means that flex failed to contact the
specified URL.   You said, " Ok, I see what is being sent".  How did you 
determine that?  You saw that where?   Tracy   
----------------------------------------
 From: [email protected]
[mailto:[EMAIL PROTECTED]
On Behalf Of wkolcz
Sent: Monday, December 08, 2008
6:01 PM
To:[email protected]
Subject: RE: [flexcoders] Re:
Desperate Times...Desprate Messures: What is sent by HTTPRequest?   

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>

>



Reply via email to