I'm new to Flex and Ant. I'm working on a flex application that makes database calls via some cfc's on the ColdFusion server.
The flex app calls the Service cfc which then in turn calls the Gateway or DAO cfc's according to the database operation.
These cfc's get placed in a certain directory within my ColdFusion server webroot. In my flex project root, I have a build.properties file which specifies the cfc directory as @deploy.distribution.dir@ = 'C:/Coldfusion9/wwwroot/theCFCFolder' . In my service cfc, I call the other cfc's by using for example:
var employeeProfileGateway = createObject("component", "@deploy.distribution.dir@.EmployeeProfileGateway").init();
(I have the EmployeeProfileGateway and the EmployeeProfileDAO in the same directory as the service.cfc)
My co-worker wrote an Ant build to copy the cfc's from the flex builder workspace into the appropriate ColdFusion directory, but I've lost this build file.
If I just copy the cfc's by hand before running, I get the following runtime error:
[RPC Fault faultString="Unable to invoke CFC - Could not find the ColdFusion component or interface @deploy.distribution.dir@.EmployeeProfileGateway." faultCode="Server.Processing" faultDetail="Ensure that the name is correct and that the component or interface exists."]
My guess is that the @deploy.distribution.dir@ doesn't get replaced by the real cfc directory and that this replacement happened somewhere in the Ant build that I've lost. If I put the cfc's in the root wwwroot directory and remove the @deploy.distribution.dir@ from the createObject call, it works. So I think it must be a problem with the build and build.properties. How do I go about replacing that @deploy....dir@ in an Ant build? What would the build.xml look like?