RE: [flexcoders] FDS / CF Endpoints
Ah yes, Joao is on the right track - I forgot that CF7.0.2 uses an RMI bridge to connect the two. I was thinking of the configuration from a CF8 + LCDS 2.5 integrated installation that is in Beta 2 right now that makes this much simpler (and avoids the need for configuring RMI to get this to work). http://labs.adobe.com/wiki/index.php/Scorpio Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of João Fernandes Sent: Thursday, April 19, 2007 2:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] FDS / CF Endpoints Darren, when you request a fill, it will contact with rtmp or polling FDS server. Then FDS looks into the configuration and try to locate CFserver (not the client itself). Tries to connect to it (if no hostname is defined in the destination configuration) with RMI. ColdFusion accepts the connection if the IP is in the allowed IP list that you can find inside the CF administrator in the flex related window. Then if allowed, if checks for the CFC assembler, calls the fill method, returns to FDS and FDS returns to the client. The EndPoint must target always FDS and never CF. João Fernandes
RE: [flexcoders] FDS / CF Endpoints
Yes, I have a * crossdomain policy in place (on both servers, just in case.) Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 18 Apr 2007 17:59:54 -0300Subject: Re: [flexcoders] FDS / CF EndpointsDarrenDid you configuration of your app crossdomain.xml to allow this thing?Regards. On 4/18/07, Darren Houle [EMAIL PROTECTED] wrote: I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun)http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints defined incorrectly in the services-config.xml that resides on SRV1 (the FDS server) In Tom's article he says to just use... endpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ But since my CF server is physically separate I changed these endpoints toendpoint uri=rtmp://srv2.mydomain.com:2048 class=flex.messaging.endpoints.RTMPEndpoint/endpoint uri=http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class= flex.messaging.endpoints.AMFEndpoint/ But it does not work. No errors, it just doesn't ds.fill() or anything. Are these endpoints supposed to point to the CF server (SRV2)... or one to the CF server and one to the FDS server... or to the FDS server (SRV1)? How do I know what port to specify for the AMFEndpoint? How does the whole messagebroker/cfamfpolling path work when there's nothing under there? I'm pretty lost when it comes to configuring endpoints in general. Thanks!Darren-- Igor Costawww.igorcosta.orgwww.igorcosta.comskype: igorpcosta
RE: [flexcoders] FDS / CF Endpoints
Is there really a servlet mapping in your ColdFusion web application's /WEB-INF/web.xml file on your srv2.mydomain.com site that is /messagebroker/*? I think ColdFusion uses /flex2gateway/* instead of /messagebroker/* for their message broker servlet mapping.
Re: [flexcoders] FDS / CF Endpoints
Give more details with the information you sent me it's very limitated to understand what you're looking for. Regards. On 4/19/07, Darren Houle [EMAIL PROTECTED] wrote: Yes, I have a * crossdomain policy in place (on both servers, just in case.) Darren -- To: flexcoders@yahoogroups.com From: [EMAIL PROTECTED] Date: Wed, 18 Apr 2007 17:59:54 -0300 Subject: Re: [flexcoders] FDS / CF Endpoints Darren Did you configuration of your app crossdomain.xml to allow this thing? Regards. On 4/18/07, *Darren Houle* [EMAIL PROTECTED] wrote: I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun) http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints defined incorrectly in the services-config.xml that resides on SRV1 (the FDS server) In Tom's article he says to just use... endpoint uri=rtmp://{server.name}:2048 class= flex.messaging.endpoints.RTMPEndpoint/ endpoint uri= http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ But since my CF server is physically separate I changed these endpoints to endpoint uri=rtmp://srv2.mydomain.com:2048 class= flex.messaging.endpoints.RTMPEndpoint/ endpoint uri= http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class= flex.messaging.endpoints.AMFEndpoint/ But it does not work. No errors, it just doesn't ds.fill() or anything. Are these endpoints supposed to point to the CF server (SRV2)... or one to the CF server and one to the FDS server... or to the FDS server (SRV1)? How do I know what port to specify for the AMFEndpoint? How does the whole messagebroker/cfamfpolling path work when there's nothing under there? I'm pretty lost when it comes to configuring endpoints in general. Thanks! Darren -- Igor Costa www.igorcosta.org www.igorcosta.com skype: igorpcosta -- Igor Costa www.igorcosta.org www.igorcosta.com skype: igorpcosta
RE: [flexcoders] FDS / CF Endpoints
Peter I was just following Tom's article, which specifies you add the following to your FDS services-config.xml !-- ColdFusion specific RTMP channel --channel-definition id=cf-dataservice-rtmp class=mx.messaging.channels.RTMPChannel endpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/ properties idle-timeout-minutes20/idle-timeout-minutes serialization!-- This must be turned off for any CF channel -- instantiate-typesfalse/instantiate-types /serialization /properties/channel-definition!-- ColdFusion specific HTTP channel --channel-definition id=cf-polling-amf class=mx.messaging.channels.AMFChannel endpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ properties serialization !-- This must be turned off for any CF channel -- instantiate-typesfalse/instantiate-types/serialization polling-enabledtrue/polling-enabled polling-interval-seconds8/polling-interval-seconds /properties/channel-definition Tom appears to be running both FDS and CF on the same physical server, so he's left {server.name} in the endpoint. I need to know whether that changes - as well as {server.port} - when you're running CF on a different server than your FDS server. Also, he's specified /{context.root}/messagebroker/cfamfpolling as the AMF endpoint path, and that apparently works in his example app. If this needs to change I have no idea what to change it too. There's no mention in his article (or anywhere else I can find) of how to modify these endpoints for any other server configuration when running FDS and CF on separate boxes. Darren To: flexcoders@yahoogroups.com From: [EMAIL PROTECTED] Date: Thu, 19 Apr 2007 07:36:33 -0700 Subject: RE: [flexcoders] FDS / CF Endpoints Is there really a servlet mapping in your ColdFusion web application's /WEB-INF/web.xml file on your srv2.mydomain.com site that is /messagebroker/*? I think ColdFusion uses /flex2gateway/* instead of /messagebroker/* for their message broker servlet mapping.
Re: [flexcoders] FDS / CF Endpoints
Darren, If you are just using FDS with CF and they run in different servers you'll have to define a hostname property to tell FDS where to find CF (I think, it's in the resource config folder, check the data-management-config.xml to check the exact property). This property must be defined in each destination you'll create. Also the messaging gateway have something similar that is the allowedIP addresses (CF servers) to connect and send messages to that destination. So if you serve your FDS app from the FDS server, just let {server.name} where it was since it will resolve at runtime to server1.yourdomain.com and connect to FDS... In this case, CF doesn't have to be visible to the client since it's FDS who calls CF and not the client. João Fernandes
Re: [flexcoders] FDS / CF Endpoints
Darren, when you request a fill, it will contact with rtmp or polling FDS server. Then FDS looks into the configuration and try to locate CFserver (not the client itself). Tries to connect to it (if no hostname is defined in the destination configuration) with RMI. ColdFusion accepts the connection if the IP is in the allowed IP list that you can find inside the CF administrator in the flex related window. Then if allowed, if checks for the CFC assembler, calls the fill method, returns to FDS and FDS returns to the client. The EndPoint must target always FDS and never CF. João Fernandes
RE: [flexcoders] FDS / CF Endpoints
Igor Not sure what other details you need, I thought I covered pretty much everything. Anything else that's missing is basically the information I'm looking for :-) My Flex client is served up from SRV1 (the FDS server). It contains the following... --- mx:DataService id=TransferCenterDS destination=cftransfer / --- That destination is defined in the FDS services-config.xml... --- services service id=data-service class=flex.data.DataService messageTypes=flex.data.messages.DataMessage adapters adapter-definition id=coldfusion-dao class=coldfusion.flex.CFDataServicesAdapter/ /adapters destination id=cftransfer adapter ref=coldfusion-dao/ channels channel ref=cf-dataservice-rtmp/ channel ref=cf-polling-amf/ /channels properties componentapplications.flex.transfer-center.cf.TransferAssembler/component scoperequest/scope metadataidentity property=TransferId/ /metadata /properties /destination /service/services --- These two CF specific channels are also defined in the FDS services-config.xml like this (but here's where I'm having endpoint woes)... --- channel-definition id=cf-dataservice-rtmp class=mx.messaging.channels.RTMPChannelendpoint uri=rtmp://srv2.mydomain.com:2048 class=flex.messaging.endpoints.RTMPEndpoint/properties idle-timeout-minutes20/idle-timeout-minutes serialization instantiate-typesfalse/instantiate-types /serialization /properties /channel-definition channel-definition id=cf-polling-amf class=mx.messaging.channels.AMFChannelendpoint uri=http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/properties serialization instantiate-typesfalse/instantiate-types /serialization polling-enabledtrue/polling-enabled polling-interval-seconds8/polling-interval-seconds/properties /channel-definition--- My Flex client also contains an ArrayCollection... --- mx:ArrayCollection id=TransferCenterAC / --- There is also a datagrid that has a dataprovider bound to this ArrayCollection. --- mx:DataGrid id=junkDG width=98% height=50% dataProvider={TransferCenterAC} mx:columns mx:DataGridColumn headerText=ID dataField=TransferId/ mx:DataGridColumn headerText=Transfer Agency dataField=TransferInfo_AgencyCB/ . /mx:columns/mx:DataGrid--- I also have a test button... --- mx:Button label=Fill click=TransferCenterDS.fill(TransferCenterAC);/--- I don't know what other information I could give you. There's not much to it. Problem is that no matter what I use for endpoints I always seem to get one type of communication error message or another. There's too many combinations of endpoints and errors to list here. All I'm really looking for is an article or blog that talks about endpoints and channels and possibly describes how they can be configured in a distributed architecture such as mine. It's surprising it's not already out there as Flex, FDS, and CF are all supposed to work together so nicely. You'd think there'd be more information on how to set the three up in a distributed way. You can find tons of tutorials on FDS using java assembler, dao, and object classes, but almost nothing on using CFCs on a CF server running on a separate physical server. Thanks Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Thu, 19 Apr 2007 12:10:59 -0300Subject: Re: [flexcoders] FDS / CF EndpointsGive more detailswith the information you sent me it's very limitated to understand what you're looking for.Regards. On 4/19/07, Darren Houle [EMAIL PROTECTED] wrote: Yes, I have a * crossdomain policy in place (on both servers, just in case.) Darren To: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 18 Apr 2007 17:59:54 -0300 Subject: Re: [flexcoders] FDS / CF EndpointsDarrenDid you configuration of your app crossdomain.xml to allow this thing?Regards. On 4/18/07, Darren Houle [EMAIL PROTECTED] wrote: I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun)http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints
RE: [flexcoders] FDS / CF Endpoints
If you are just using FDS with CF and they run in different servers you'll have to define a hostname property to tell FDS where to find CF (I think, it's in the resource config folder, check the data-management-config.xml to check the exact property). This property must be defined in each destination you'll create. João, yes, from what I understand that's what the... !-- ColdFusion specific RTMP channel --channel-definition id=cf-dataservice-rtmp class=mx.messaging.channels.RTMPChannelendpoint uri=rtmp://{server.name}:2048 class=flex.messaging.endpoints.RTMPEndpoint/ and !-- ColdFusion specific HTTP channel --channel-definition id=cf-polling-amf class=mx.messaging.channels.AMFChannelendpoint uri=http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ sections are for in the services-config.xml Channels definition. Tom says to add them to the services-config.xml because all the standard FDS channel definitions are already in there... but you need to add the CF channels so FDS can talk to the CF server. I've done that, my problem is that I can't seem to get the CF endpoints right. What is /messagebroker/cfamfpolling and how do I know what port it's running on? There's nothing in Tom's article syaing you need to go into CFIDE and turn anything on, so...? Also the messaging gateway have something similar that is the allowedIP addresses (CF servers) to connect and send messages to that destination. Not sure if you mean the crossdomain file... I have that. If you mean something else then maybe you could be more specific? In the CFIDE there are checkboxes to let FDS talk to CF... those are checked. There's also an IP listed in the allow box so CF will allow the FDS server in, so... are you talking about something else? So if you serve your FDS app from the FDS server, just let {server.name} where it was since it will resolve at runtime to server1.yourdomain.com and connect to FDS... Yes, that's fine for the standard FDS channel definitions... but you need correct endpoints for the CF channels. The EndPoint must target always FDS and never CF. Yes, the FDS endpoints target FDS... but the CF endpoints must be set correctly for FDS to find CF... that's where I'm having a problem. It's supposed to be cut n paste when the CF server is on the same box as the FDS server, but when it's not... then what? Thanks! Darren
Re: [flexcoders] FDS / CF Endpoints
No Darren, CF type endpoints MUST point to FDS and NOT to CF itself. It's always FDS that will communicate with CF and never the swf file itself. I'm not talking about the crossdomain but the data-management. In there you have all your destinations definitions. If you take a look in the deployment of FDS (c:\fds?) there is a resource\config folder where you can find an example of a cf destination. inside of it, you'll see that there is a property that will define which host is using cf and that destination will try to connect. in the admin panel that you talked about, yes, you need to configure FDS IP address there so CF will allow that machine to communicate with CF itself. The main point is, if you don't define in your destination configuration (destination id=somedestination...) what is the cf hostname, FDS will think that CF is running locally. João Fernandes
Re: [flexcoders] FDS / CF Endpoints
Darren Did you configuration of your app crossdomain.xml to allow this thing? Regards. On 4/18/07, Darren Houle [EMAIL PROTECTED] wrote: I'm building an FDS app but instead of defining an assembler.class, dao.class, and customobject.class on the FDS server in Java I'm defining them on a ColdFusion server using CFCs. I'm following Tom Jordahl's article located here: http://www.adobe.com/devnet/flex/articles/coldfusionflex_part1_02.html But, while Tom is running both FDS and CF on a single physical server, I have two separate physical servers... http://srv1.mydomain.com (FDS with integrated JRun) http://srv2.mydomain.com (ColdFusion Ent 7.0.2) My Flex client is being served out to the browser from SRV1 (the FDS server) and I have ObjAssembler.cfc, ObjDAO.cfc, and Obj.cfc on SRV2 (the ColdFusion server) In my Flex client I define a DataService to manage my Obj's in a simple grid just to test that it's all wired correctly, but it's not working. I believe my problem is that I have my endpoints defined incorrectly in the services-config.xml that resides on SRV1 (the FDS server) In Tom's article he says to just use... endpoint uri=rtmp://{server.name}:2048 class= flex.messaging.endpoints.RTMPEndpoint/ endpoint uri= http://{server.name}:{server.port}/{context.root}/messagebroker/cfamfpolling; class=flex.messaging.endpoints.AMFEndpoint/ But since my CF server is physically separate I changed these endpoints to endpoint uri=rtmp://srv2.mydomain.com:2048 class= flex.messaging.endpoints.RTMPEndpoint/ endpoint uri= http://srv2.mydomain.com:{server.port}/messagebroker/cfamfpolling; class= flex.messaging.endpoints.AMFEndpoint/ But it does not work. No errors, it just doesn't ds.fill() or anything. Are these endpoints supposed to point to the CF server (SRV2)... or one to the CF server and one to the FDS server... or to the FDS server (SRV1)? How do I know what port to specify for the AMFEndpoint? How does the whole messagebroker/cfamfpolling path work when there's nothing under there? I'm pretty lost when it comes to configuring endpoints in general. Thanks! Darren -- Igor Costa www.igorcosta.org www.igorcosta.com skype: igorpcosta