Hey greg,

I think you're making this a bit more complicated than need be. Are you
using roles authentication? If so, you'll need to set the remote method to
have the proper authority. If not, than you're setting the credentials for
no reason.

I have an example of roles authentication remoting at home that I can post
if thats your intention.

Cheers,

Kevin

----------
http://www.keslabs.com

Coldfusion Remote Dashboard ::
http://www.keslabs.com/crd

-----Original Message-----
From: Greg Johnson [mailto:[EMAIL PROTECTED]
Sent: Monday, April 11, 2005 9:37 AM
To: CF-Talk
Subject: Flash 2004 Remoting


Can anyone point me to a good source on the web to see some actual code
on how to do this.  Been following the stuff in the official referance
and have some 2004 books on order, but what I am trying just aint
working.  I have a cfc located in the gateway/cfc directory with the
contents of

> <cfcomponent displayname="Legislator" hint="This cfc allows retrieval
> of Legislator Data">
>     <cffunction access="remote" name="returnhouse" returntype="query"
> displayname="Return House" hint="This returns a list of Legislators in
> the house.">
>
>         <CFQUERY NAME="qry_house_legs" DATASOURCE="NC_Impact">
>             SELECT     nvc_leg_name
>             FROM         dbo.tbl_leg
>             WHERE     (int_leg_house_senate = 1);
>         </CFQUERY>
>         <cfset Flash.Result = qry_house_legs>
>         <cfreturn qry_house_legs>
>
>     </cffunction>
> </cfcomponent>

and put this in the first frame of my flash app

> //Import Classes
> import mx.remoting.Service;
> import mx.remoting.PendingCall;
> import mx.rpc.RelayResponder;
> import mx.rpc.ResultEvent;
> import mx.rpc.FaultEvent;
>
> //Create ReplayResponder to specify result handling methods
> var myResponder:RelayResponder = new
> RelayResponder(this,"returnhouse_Result","returnhouse_Fault");
>
> //establish gateway and create a Service object to refer to the service
> var CFMService:Service = new
>
Service("http://localhost:8500/flashservices/gateway",null,"legislators",nul
l,null);
>
> //set user credentials
> CFMService.connection.setCredentials("cfa","cfa");
>
> //call service function
> var temp_pc:PendingCall = CFMService.returnhouse();
> trace("call made");
>
> //Result Handler
> function returnhouse_Result (re:ResultEvent):Void {
>     trace("Worked");
> }
>
> //Fault Handler
> function returnhouse_Fault (fe:FaultEvent):Void {
>     trace("Failed");
> }

When I run it the output gives me the /*call made*/ and no errors, but
thats it.  No /*worked */or /*failed*/. :'(

--
Greg Johnson
Owner & Lead Technician
[EMAIL PROTECTED]

Techno-Fix-It
Filling the Gap Between the Store and the Repair Shop
----------------------
www.technofixit.com
Phone:(919)-371-1476
Fax:(919)-882-9804
P.O. Box 1094
Morrisville, N.C. 27560





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:202197
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to