[flexcoders] Re: RemoteObject (Beta2) - cannot find CFC

2006-04-07 Thread Ryan Pieszak
Hey Dirk,

Thanks for the reply.

I think I've gotten past this point, I can get the swf to compile and 
load in the browser.  My problem is that it can't connect to the 
CFC.  It tells me 'Unknown destination', that it cannot find the cfc.

I don't know if I have to predefine it in the flex-enterprise-
services.xml file, and the reference some sort of ID, or if it's 
completely created and connected to in the mxml file.

Thanks for the help.


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

 Make sure that when you create your Flex 2 Project in Flex Builder 
to
 choose ColdFusion Flash Remoting Service. 
 
 In the next step for Root folder specify the remote directory 
where
 CF's WEB-INF folder sits, i.e.
 
   \\dev-machine\Jrun4\servers\cfusion\cfusion-ear\cfusion-war\
 
 in the field Root URL specify the URL where the remote CF webroot 
maps
 to, eg.
 
   http://dev-machine:8500
 
 Before you can continue, hit Validate Location - this should give 
you
 a positive answer. In the next step choose any name for the project 
(eg
 CFTest)
 
 If everything is setup correctly, Flex Builder will create a folder 
with
 the same name as the project on the CF server. For the above 
example the
 URL will be http://dev-machine:8500/CFTest. All generated output 
will be
 automatically uploaded to the remote server.
 
 That's pretty much it. If you run your Flex 2 app it should open 
from
 the remote server.
 
 Dirk.
 
 
  -Original Message-
  From: flexcoders@yahoogroups.com 
  [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Pieszak
  Sent: Friday, April 07, 2006 2:51 PM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Re: RemoteObject (Beta2)
  
  Hey Matt,
  
  Yeah, I've installed the CF/Flex Connectivity, but it is 
  still having trouble.  I think the problem is that most of 
  the installatin assumes that you're developing/deploying on 
  the same server (everything is set to localhost), but we 
  develop on our local pc's, test on the development server, 
  and then eventually post it live to the production server.  I 
  think this is pretty standard, but I can't find any 
  documentation on what to change to accomodate this.
  
  Also, I think I'm on to something in my CFC post, but I need 
  some clarification...
  http://groups.yahoo.com/group/flexcoders/message/33505
  
  Thanks.
 








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





Re: [flexcoders] Re: RemoteObject (Beta2) - cannot find CFC

2006-04-07 Thread Simeon Bateman



You probably need to uncomment the specific information in your flex-enterprise-services.xml file. But just so you dont have to wonder what that is, I am including the contents of mine below. Just make sure that the endpoint for the my-cfamf channel uses the correct port.
simeon?xml version=1.0 encoding=UTF-8?services-config xmlns=http://www.macromedia.com/2005/flex-service-config
 services service id=coldfusionsamples-service class=flex.messaging.services.RemotingService messageTypes=flex.messaging.messages.RemotingMessage
 adapters adapter-definition id=cf-object class=coldfusion.flash.messaging.ColdFusionAdapter default=true/ /adapters
 destination id=ColdFusion channels channel ref=my-cfamf/ /channels properties
 source*/source lowercase-keystrue/lowercase-keys /properties /destination /service
 /services security login-command class=flex.messaging.security.JRunLoginCommand server=JRun/ /security channels
 channel-definition id=my-cfamf class=mx.messaging.channels.AMFChannel endpoint uri=http://localhost:8304/flex2gateway/
 class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled serialization
 custom-deserializer type=typed-object class=coldfusion.flash.messaging.io.amf.serializers.TypedObjectDeserializer / /serialization /properties
 /channel-definition /channels logging target class=flex.messaging.log.ConsoleTarget level=Debug properties
 prefix[Flex] /prefix includeDatefalse/includeDate includeTimefalse/includeTime includeLevelfalse/includeLevel
 includeCategoryfalse/includeCategory /properties filters patternEndpoint.*/pattern patternService.*/pattern
 patternConfiguration/pattern patternMessage.*/pattern /filters /target /logging system
 locale default-localeen/default-locale supported-localede/supported-locale supported-localefr/supported-locale
 supported-localees/supported-locale /locale  redeploy enabledtrue/enabled watch-interval20/watch-interval
 watch-file{context.root}/WEB-INF/flex/flex-enterprise-services.xml/watch-file touch-file{context.root}/WEB-INF/web.xml/touch-file /redeploy 
 /system/services-configOn 4/7/06, Ryan Pieszak [EMAIL PROTECTED]
 wrote:
I think I've gotten past this point, I can get the swf to compile and 
load in the browser. My problem is that it can't connect to the 
CFC. It tells me 'Unknown destination', that it cannot find the cfc.

I don't know if I have to predefine it in the flex-enterprise-
services.xml file, and the reference some sort of ID, or if it's 
completely created and connected to in the mxml file.







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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









[flexcoders] Re: RemoteObject (Beta2) - cannot find CFC

2006-04-07 Thread angelosalsa
Did you try doing this:
in the Additional Compiler Arguments:
--services=C:\CFusionMX7\wwwroot\WEB-INF\flex\flex-enterprise-
services.xml
Also make sure that this file has:

services

service id=coldfusionsamples-service
 class=flex.messaging.services.RemotingService
 
messageTypes=flex.messaging.messages.RemotingMessage

adapters
adapter-definition id=cf-object 
class=coldfusion.flash.messaging.ColdFusionAdapter default=true/
/adapters

destination id=ColdFusion
channels
channel ref=my-cfamf/
/channels
properties
source*/source
!-- define the resolution rules and access level 
of the cfc being invoked --
access
!-- Use the ColdFusion mappings to find 
CFCs, by default only CFC files under your webroot can be found. --
use-mappingsfalse/use-mappings
!-- allow public and remote or 
just remote methods to be invoked --
method-access-levelremote/method-access-
level
/access

property-case
!-- cfc property names --
force-cfc-lowercasefalse/force-cfc-
lowercase
!-- Query column names --
force-query-lowercasefalse/force-query-
lowercase
!-- struct keys --
force-struct-lowercasefalse/force-struct-
lowercase
/property-case
/properties
/destination

/service

/services

Let me know !!

Angelo



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

 Hey Dirk,
 
 Thanks for the reply.
 
 I think I've gotten past this point, I can get the swf to compile 
and 
 load in the browser.  My problem is that it can't connect to the 
 CFC.  It tells me 'Unknown destination', that it cannot find the 
cfc.
 
 I don't know if I have to predefine it in the flex-enterprise-
 services.xml file, and the reference some sort of ID, or if it's 
 completely created and connected to in the mxml file.
 
 Thanks for the help.
 
 
 --- In flexcoders@yahoogroups.com, Dirk Eismann DEismann@ 
 wrote:
 
  Make sure that when you create your Flex 2 Project in Flex 
Builder 
 to
  choose ColdFusion Flash Remoting Service. 
  
  In the next step for Root folder specify the remote directory 
 where
  CF's WEB-INF folder sits, i.e.
  
\\dev-machine\Jrun4\servers\cfusion\cfusion-ear\cfusion-war\
  
  in the field Root URL specify the URL where the remote CF 
webroot 
 maps
  to, eg.
  
http://dev-machine:8500
  
  Before you can continue, hit Validate Location - this should 
give 
 you
  a positive answer. In the next step choose any name for the 
project 
 (eg
  CFTest)
  
  If everything is setup correctly, Flex Builder will create a 
folder 
 with
  the same name as the project on the CF server. For the above 
 example the
  URL will be http://dev-machine:8500/CFTest. All generated output 
 will be
  automatically uploaded to the remote server.
  
  That's pretty much it. If you run your Flex 2 app it should open 
 from
  the remote server.
  
  Dirk.
  
  
   -Original Message-
   From: flexcoders@yahoogroups.com 
   [mailto:[EMAIL PROTECTED] On Behalf Of Ryan Pieszak
   Sent: Friday, April 07, 2006 2:51 PM
   To: flexcoders@yahoogroups.com
   Subject: [flexcoders] Re: RemoteObject (Beta2)
   
   Hey Matt,
   
   Yeah, I've installed the CF/Flex Connectivity, but it is 
   still having trouble.  I think the problem is that most of 
   the installatin assumes that you're developing/deploying on 
   the same server (everything is set to localhost), but we 
   develop on our local pc's, test on the development server, 
   and then eventually post it live to the production server.  I 
   think this is pretty standard, but I can't find any 
   documentation on what to change to accomodate this.
   
   Also, I think I'm on to something in my CFC post, but I need 
   some clarification...
   http://groups.yahoo.com/group/flexcoders/message/33505
   
   Thanks.
  
 







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




[flexcoders] Re: RemoteObject (Beta2) - cannot find CFC

2006-04-07 Thread Alexander Tsoukias
My experience was frustrating in the beginning as well.

I used the wizards straight from a database table and I had 2 days 
of nightmares trying to make it all work. It turned out that 
everything works perfectly.

Though the automatically generated CFCs (some of them - especially 
in the DAO one) had no access defined as remote.

So because i didn't want to touch the automatically generated CFCs, 
I looked for another option which was setting this line in the XML 
file:

method-access-levelremote/method-access-level

to this:

method-access-levelpublic/method-access-level

and it all worked like a charm.

(I may be off topic, but hope it helps somehow).

Alex



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

 Did you try doing this:
 in the Additional Compiler Arguments:
 --services=C:\CFusionMX7\wwwroot\WEB-INF\flex\flex-enterprise-
 services.xml
 Also make sure that this file has:
 
 services
 
 service id=coldfusionsamples-service
  class=flex.messaging.services.RemotingService
  
 messageTypes=flex.messaging.messages.RemotingMessage
 
 adapters
 adapter-definition id=cf-object 
 class=coldfusion.flash.messaging.ColdFusionAdapter 
default=true/
 /adapters
 
 destination id=ColdFusion
 channels
 channel ref=my-cfamf/
 /channels
 properties
 source*/source
 !-- define the resolution rules and access 
level 
 of the cfc being invoked --
 access
 !-- Use the ColdFusion mappings to find 
 CFCs, by default only CFC files under your webroot can be found. --

 use-mappingsfalse/use-mappings
 !-- allow public and remote or 
 just remote methods to be invoked --
 method-access-levelremote/method-access-
 level
 /access
 
 property-case
 !-- cfc property names --
 force-cfc-lowercasefalse/force-cfc-
 lowercase
 !-- Query column names --
 force-query-lowercasefalse/force-query-
 lowercase
 !-- struct keys --
 force-struct-lowercasefalse/force-
struct-
 lowercase
 /property-case
 /properties
 /destination
 
 /service
 
 /services
 
 Let me know !!
 
 Angelo
 
 
 
 --- In flexcoders@yahoogroups.com, Ryan Pieszak ryanpieszak@ 
 wrote:
 
  Hey Dirk,
  
  Thanks for the reply.
  
  I think I've gotten past this point, I can get the swf to 
compile 
 and 
  load in the browser.  My problem is that it can't connect to the 
  CFC.  It tells me 'Unknown destination', that it cannot find the 
 cfc.
  
  I don't know if I have to predefine it in the flex-enterprise-
  services.xml file, and the reference some sort of ID, or if it's 
  completely created and connected to in the mxml file.
  
  Thanks for the help.
  
  
  --- In flexcoders@yahoogroups.com, Dirk Eismann DEismann@ 
  wrote:
  
   Make sure that when you create your Flex 2 Project in Flex 
 Builder 
  to
   choose ColdFusion Flash Remoting Service. 
   
   In the next step for Root folder specify the remote 
directory 
  where
   CF's WEB-INF folder sits, i.e.
   
 \\dev-machine\Jrun4\servers\cfusion\cfusion-ear\cfusion-war\
   
   in the field Root URL specify the URL where the remote CF 
 webroot 
  maps
   to, eg.
   
 http://dev-machine:8500
   
   Before you can continue, hit Validate Location - this should 
 give 
  you
   a positive answer. In the next step choose any name for the 
 project 
  (eg
   CFTest)
   
   If everything is setup correctly, Flex Builder will create a 
 folder 
  with
   the same name as the project on the CF server. For the above 
  example the
   URL will be http://dev-machine:8500/CFTest. All generated 
output 
  will be
   automatically uploaded to the remote server.
   
   That's pretty much it. If you run your Flex 2 app it should 
open 
  from
   the remote server.
   
   Dirk.
   
   
-Original Message-
From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan Pieszak
Sent: Friday, April 07, 2006 2:51 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: RemoteObject (Beta2)

Hey Matt,

Yeah, I've installed the CF/Flex Connectivity, but it is 
still having trouble.  I think the problem is that most of 
the installatin assumes that you're developing/deploying on 
the same server (everything is set to localhost), but we 
develop on our local pc's, test on the development server, 
and then eventually post it live to the production server.  
I 
think this is pretty standard, but I can't find any 
documentation on what to change to 

Re: [flexcoders] Re: RemoteObject (Beta2) - cannot find CFC

2006-04-07 Thread Muzak
If you're connection from a different machine than the one CF is installed on, 
use {content.root} in the endpoint uri attribute.
Mine looks like this:

endpoint uri={context.root}/flex2gateway/ 
class=flex.messaging.endpoints.AMFEndpoint/

If you look at the top of the flex-enterprise-services.xml, you'll notice that 
there's already a destination defined, called 
'ColdFusion'
When using that destination as the destination of a RemoteObject, you can 
access any cfc on your server (without having to modify 
the flex-enterprise-services.xml).
You then specify the path to the cfc in the source property of the RemoteObject.

RemoteObject destination=ColdFusion source=path.to.cfc.on.server
  mx:method name=someMethod result=someMethodResult(event) 
fault=someMethodFault(event)
/RemoteObject

Now, this way of accessing cfc's has been added for backwards compatibility 
(see docs) and is not recommended.
You should add destination tags to the flex-enterprise-services.xml as needed.
Here's an example from the docs:

destination id=SampleEmployeeRO
properties
sourcesamples.explorer.EmployeeManager/source
statefultrue/stateful
/properties
adapter ref=java-object/
/destination

The destination id is what you'll use as the destination of the RemoteObject. 
And you don't specify a 'source' in the RemoteObject, 
since it's defined in the xml file.

RemoteObject destination=SampleEmployeeRO
  mx:method name=someMethod result=someMethodResult(event) 
fault=someMethodFault(event)
/RemoteObject



hope this helps,
Muzak


- Original Message - 
From: Simeon Bateman [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Friday, April 07, 2006 11:05 PM
Subject: Re: [flexcoders] Re: RemoteObject (Beta2) - cannot find CFC


You probably need to uncomment the specific information in your
flex-enterprise-services.xml file.  But just so you dont have to wonder what
that is, I am including the contents of mine below.  Just make sure that the
endpoint for the my-cfamf channel uses the correct port.

simeon

?xml version=1.0 encoding=UTF-8?
services-config xmlns=http://www.macromedia.com/2005/flex-service-config;

services

service id=coldfusionsamples-service
class=flex.messaging.services.RemotingService
messageTypes=flex.messaging.messages.RemotingMessage

adapters
adapter-definition id=cf-object class=
coldfusion.flash.messaging.ColdFusionAdapter default=true/
/adapters

destination id=ColdFusion
  channels
channel ref=my-cfamf/
  /channels
  properties
source*/source
lowercase-keystrue/lowercase-keys
  /properties
/destination
/service

/services

security

login-command class=flex.messaging.security.JRunLoginCommand
server=JRun/

/security

channels

 channel-definition id=my-cfamf class=
mx.messaging.channels.AMFChannel
endpoint uri=http://localhost:8304/flex2gateway/; class=
flex.messaging.endpoints.AMFEndpoint/
properties
polling-enabledfalse/polling-enabled
serialization
custom-deserializer type=typed-object class=
coldfusion.flash.messaging.io.amf.serializers.TypedObjectDeserializer /
/serialization
/properties
/channel-definition
/channels
logging

target class=flex.messaging.log.ConsoleTarget level=Debug
properties
prefix[Flex] /prefix
includeDatefalse/includeDate
includeTimefalse/includeTime
includeLevelfalse/includeLevel
includeCategoryfalse/includeCategory
/properties
filters
patternEndpoint.*/pattern
patternService.*/pattern
patternConfiguration/pattern
patternMessage.*/pattern
/filters
/target

/logging

system
locale
default-localeen/default-locale
supported-localede/supported-locale
supported-localefr/supported-locale
supported-localees/supported-locale
/locale

redeploy
enabledtrue/enabled
watch-interval20/watch-interval
watch-file{context.root}/WEB-INF/flex/flex-
enterprise-services.xml/watch-file
touch-file{context.root}/WEB-INF/web.xml/touch-file
/redeploy
/system

/services-config


On 4/7/06, Ryan Pieszak [EMAIL PROTECTED] wrote:

 I think I've gotten past this point, I can get the swf to compile and
 load in the browser.  My problem is that it can't connect to the
 CFC.  It tells me 'Unknown destination', that it cannot find the cfc.

 I don't know if I have to predefine it in the flex-enterprise-
 services.xml file, and the reference some sort of ID, or if it's