[flexcoders] Re: Newbie problem sending an object to a cfc - where have I gone wrong?

2006-09-18 Thread foote3
Irina --

Thanks for the suggestion, but I'm not sure that's germaine.  I've
used other remote objects that are working just fine without a channel
definition.  This seems to be an issue of the object I'm passing from
Flex/ActionScript is not being well received by ColdFusion.  (Unless
I'm missing the fact that defining a channel would affect that in some
way?)

Al

--- In flexcoders@yahoogroups.com, iviivi_us [EMAIL PROTECTED] wrote:

 Hi Al,
 
 It's seems to me you are missing channel definition, 
 something like
 
 public var cSet:ChannelSet;
 
 public function initApp()
 {
 cSet = new ChannelSet();
 var customChannel:Channel = new AMFChannel(my-cfamf, 
 http://localhost:8500/flex2gateway/);
 // Add the Channel to the ChannelSet. cSet.addChannel(customChannel);
 foo.channelSet = cSet;
 }
 
 
 mx:RemoteObject 
 id=foo 
 destination=ColdFusion 
 source=com.foo.component /
 
 I took the code from Mike Nimer's Blog:
 http://www.mikenimer.com/index.cfm/2006/7/19/Flex-Data-Server-and-CF-
 Flash-Remoting-together
 
 
 Irina
 --- In flexcoders@yahoogroups.com, foote3 foote3@ wrote:
 
  I'm trying to pass an object back to a cfc via RemoteObject and 
 can't
  get a favorable resolution, please look this over and let me know if
  you see my error?
  
  The error I am getting seems to imply that either the object is not
  being sent or it's not arriving correctly. (How does ColdFusion
  receive an object? Should I be using some other type (struct, array,
  etc.)?)
  
  Al
  
  The object is a collection of name/value pairs and is defined.
  
  This is the ActionScript part:
  
  //this is the creation of the object
  var eventTransfer:Object = modelEvent.transferObject;
  
  public var svcEvent:RemoteObject = new RemoteObject();
  public function useRemoteObject(eventTransfer:Object):void{
  svcEvent.destination =ColdFusion;
  svcEvent.source = EventComp;
  svcEvent.qryEventData.addEventListener(result, resultHandler);
  svcEvent.qryEventData.addEventListener(fault, faultHandler);
  svcEvent.qryEventData(eventTransfer);
  }
  
  This is the CFC:
  cfcomponent name=EventComp
  
  cffunction name=qryEventData access=remote returnType=query
  cfargument name=eventTransfer type=struct required=yes/
  cfparam name=eventTransfer type=any default=not_passed/
  
  cfif eventTransfer is not not_passed
  cfset eventName = eventTransfer.eventName
  cfset eventLocation = eventTransfer.eventLocation
  cfset contactName = eventTransfer.contactName
  
  cfquery datasource=Roster name=newEvent debug=yes
  INSERT INTO tblEvents
  (eventName, eventLocation, contactName)
  VALUES (#eventName#, #eventLocation#, #contactName#)
  /cfquery
  /cfif
  cfquery datasource=Roster name=event debug=yes
  SELECT * FROM tblEvents
  /cfquery
  // this if statement is just so I can tell if the parameter is 
 really
  passed or not.
  cfif eventTransfer is not_passed
  cfquery datasource=Roster name=event debug=yes
  SELECT * FROM tblEvents WHERE eventName = NSCW
  /cfquery
  /cfif
  cfreturn event
  /cffunction
  /cfcomponent
 








--
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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/
 




[flexcoders] Newbie problem sending an object to a cfc - where have I gone wrong?

2006-09-17 Thread foote3
I'm trying to pass an object back to a cfc via RemoteObject and can't
get a favorable resolution, please look this over and let me know if
you see my error?

The error I am getting seems to imply that either the object is not
being sent or it's not arriving correctly. (How does ColdFusion
receive an object? Should I be using some other type (struct, array,
etc.)?)

Al

The object is a collection of name/value pairs and is defined.

This is the ActionScript part:

//this is the creation of the object
var eventTransfer:Object = modelEvent.transferObject;

public var svcEvent:RemoteObject = new RemoteObject();
public function useRemoteObject(eventTransfer:Object):void{
svcEvent.destination =ColdFusion;
svcEvent.source = EventComp;
svcEvent.qryEventData.addEventListener(result, resultHandler);
svcEvent.qryEventData.addEventListener(fault, faultHandler);
svcEvent.qryEventData(eventTransfer);
}

This is the CFC:
cfcomponent name=EventComp

cffunction name=qryEventData access=remote returnType=query
cfargument name=eventTransfer type=struct required=yes/
cfparam name=eventTransfer type=any default=not_passed/

cfif eventTransfer is not not_passed
cfset eventName = eventTransfer.eventName
cfset eventLocation = eventTransfer.eventLocation
cfset contactName = eventTransfer.contactName

cfquery datasource=Roster name=newEvent debug=yes
INSERT INTO tblEvents
(eventName, eventLocation, contactName)
VALUES (#eventName#, #eventLocation#, #contactName#)
/cfquery
/cfif
cfquery datasource=Roster name=event debug=yes
SELECT * FROM tblEvents
/cfquery
// this if statement is just so I can tell if the parameter is really
passed or not.
cfif eventTransfer is not_passed
cfquery datasource=Roster name=event debug=yes
SELECT * FROM tblEvents WHERE eventName = NSCW
/cfquery
/cfif
cfreturn event
/cffunction
/cfcomponent 





--
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/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/
 





[flexcoders] Trying to understand RemoteObjects

2006-08-07 Thread foote3
Hi all --

I'm a first time poster, what a great group!

I've been working with ColdFusion for a while and am moving into Flex
with the release of Flex 2.  One of the things that's confusing me
right now is the RemoteObject.  I've seen a couple of similar issues
in the posts, but am trying to understand the root of my issue.

I created on my local machine the Hello World example that Kyle
Quevillon has on the Adobe site
(http://www.adobe.com/devnet/flex/articles/helloworld.html)

The good news is, it works perfectly on my local machine.  The bad
news is, when I try to move it to our production server (a shared
server running CF 7.0.2), I get a Permission denied message back.
(Specifically: faultCode:Server.processing; faultString:'Permission
denied'; faultDetail:'Null')

I have a feeling that this is related to either a) the settings in my
Flex compiler (perhaps the additional compiler arguments), b) a
setting on the shared server (they say they set up a crossdomain.xml
for our domain), or a combination thereof.

Has anyone ran into this error message or see what it is I'm missing?
 I have a feeling it's something very obvious...

Thanks,
Al






--
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/