7 Replies Latest reply on Nov 18, 2009 8:08 PM by SunilAdobe

    Connect FB4 to a DevServer

    ProjectedSurplus Level 1

      Almost all the examples refer to a localhost CF8 but . . . . how to connect to a CF8 (running atop IIS) Server on a networked machine.


      Could someone please explain the settings for "Configure ColdFusion Server"?????


      Fwiw I can validate configuration using


      CF root folder: \\DevServer\ColdFusion8


      Webroot:  \\Devserver\ColdFusion8\wwwroot\test


      Root URL:  http://174.1.xxx.xxx:8500/test


      Output folder: \\Devserver\ColdFusion8\wwwroot\test\ProjName-debug




      but when I then click the Data/Services tab >>> Connect to Data/Service  >> ColdFusion      I either get a "The selected service should be under the web root of the current project"  error   OR  an error during introspection  (yet I can go to Preferences and successfully test my RDS connection)


      Thanks in advance

        • 1. Re: Connect FB4 to a DevServer
          SunilAdobe Adobe Employee

          The error during introspection can happen when an invalid web-root is given. I can see that here the web root that you have is ending with the test folder, just give the following and try it out, i.e. without the test folder.


          Webroot:  \\Devserver\ColdFusion8\wwwroot


          Root URL:  http://174.1.xxx.xxx:8500


          Hope this helps


          1 person found this helpful
          • 2. Re: Connect FB4 to a DevServer
            ProjectedSurplus Level 1

            Thanks, that got me through the first part of the wizard, however now when I go to configure CF Service  >>>  Import CFC     no matter where I browse to (local or networked cfcs) I get the following error which will not let me progress to Finish:


            " The selected service should be under web root of current project."

            • 3. Re: Connect FB4 to a DevServer
              SunilAdobe Adobe Employee

              The validation in the beta build requires that the file path need to have web root in it. So make sure the path that you are giving while importing is under the web root.


              So for example, if your web root is \\Devserver\ColdFusion8\wwwroot\


              then the file you are importing should be under \\Devserver\ColdFusion8\wwwroot or any of its subdirectory. For example \\Devserver\mycfc\a.cfc would not work as \\Devserver\mycfc does not have \\Devserver\ColdFusion\wwwroot as a prefix in its path.


              Hope this helps


              • 4. Re: Connect FB4 to a DevServer
                ProjectedSurplus Level 1

                That seems to work -- thx.  If possible might you quickly explain (or point me to an explanation for) the AsyncToken and/or _Super services??


                From what I can deduce, a services.cfcName package is created with a _Super_cfcName class which calls the function and wraps the returned data in an AsyncToken.  A cfcName class then extends the above _Super class so that I can process the returned data (ie into a VO say).



                Presumably there is not serverside mapping (ie via alias= ) ???   Per other posts I have made elsewhere though I am not sure of the importance of server side mapping, do you have any thoughts?

                • 5. Re: Connect FB4 to a DevServer
                  SunilAdobe Adobe Employee



                  For example in the call below (when you bind the getAllEmployees operation to a data grid, the following code gets generated)


                  getAllEmployeesResult.token = EmployeesService4.getAllEmployees();


                  getAllEmployees is of type callResponder, defined in the declarations tag. The getAllEmployees() function internally uses the RemoteObject class of flex to make the server side call and that is asynchronous, and the call would not return immediately, but would return a token instead.


                  You can use the token to set up your own responder, event listener, so that you get the notification of when the function actually gets complete or fault is thrown.


                  But the call responder has result and fault events which actually does the job, and you can see that in the generated code for the result handler.




                  This is the class that gets generated for every service that is imported. All the operations in the service (in your cfc or php file) will get generated as operations. If you want any customization to be done you could override the functions in the another file that is generated (without the super keyword) i.e. the service.as


                  Ther server side mapping similar to the below tag




                  will be placed in the service.as file above the class definition. This will be done only when there is a corresponding class definition on the server side too.


                  Importance of server side mapping:


                  1. If you have a single class definition and you want that definition to be maintained across your application boundaries that way there is less maintenance headache and less number of bugs during development.


                  2. Working with strong types is much more object oriented than the weak types, for example getAddress when it returns an Address object with a set of parameters, it does not care whether it is stored as a xml or json or in some other datastructure on the server side and that could still change, but the address object will not change.


                  3. Also, if you are working with multiple backends, multiple services, which deal with similar data, like a http service also returns address but in XML, then it is much more useful to use a single object across services in this case that XML could be converted to Address object and can be used with your CF services.


                  4. Also another point to note here is that the Remote class will not be generated if there is not server side class, but you could continue to work with classes on the client side in AS, by configuring your return type.


                  Hope this helps.


                  • 6. Re: Connect FB4 to a DevServer

                    I have a similar question to the first one in thie thread but our setup is different.


                    We have 4 developers.  We have a dev, test, stage and production cluster servers.


                    We are looking to get into Flex.  Right now need to build two specific applications in Flex that will interact with ColdFusion through BlazeDS, and one that would use Flash Remoting.  All 3 are just a small part of a much larger project.


                    We have been scratching our heads about how to properly setup the development environment for our company.  We'd prefer not to have each developer install a version of ColdFusion on their PCs.  Would much rather just keep our existing CF servers as they are, and somehow have Flash Builder connect to those server instances.


                    We also can't use the method of having the servers as mapped folders, as that has not been enabled by our networking guys.

                    What are our options?  Can someone post some instructions on how to we can properly setup the Flex development enviroment for everyone that can work with ColdFusion and BlazeDS?


                    Thank you.

                    • 7. Re: Connect FB4 to a DevServer
                      SunilAdobe Adobe Employee

                      FlashBuilder requires write access to the webroot as the swf built will be deployed there. And also it determines the location of the

                      Services config file which is required for connecting to remote destinations on the cf server.


                      You have ruled out the 2 options, i.e. local CF server, or remote file access to the CF server.


                      The obvious suggestion would be: You could have 1 developer host a test server and others connecting to it and then finally deploy it to your central server.

                      The following should help: