Set up your development environment
27
To ensure that Flex Data Services recognizes the ColdFusion Event Gateway Adapter, you edit
the messaging-config.xml file, which is located in the
C:\fds2\jrun4\servers\default\samples\WEB-INF\flex directory if you installed Flex Data
Services using the default settings.
To enable communication through the Flex Messaging event gateway:
1.
Copy the <adapter-definition> section in which
id=”cfgateway”
from the sample
messaging-config.xml file to the <adapter> section of the web application messaging-
config.xml file.
The sample messaging-config.xml file is located in the C:\fds2\resources\config\flex
folder, and the web application messaging-config.xml file is located in the
C:\fds2\jrun4\servers\default\samples\WEB-INF\flex folder when you install Flex in the
default location.
2.
Copy the <destination> section in which
id=”ColdFusionGateway”
from the sample
messaging-config.xml file to web application messaging-config.xml file.
3.
Save the file.
Create an instance of the Flex Messaging event
gateway
To be able to communicate with the ColdFusion application through the Flex Event Gateway,
you must create an instance of the gateway.
1.
Create a blank file handleemail.cfc in the C:\CFusionMX7\wwwroot\flexgatewayexamples
directory. (The flexgatewayexamples directory does not already exist.)
2.
Start the ColdFusion MX Administrator.
3.
Select Event Gateways > Gateway Instances.
4.
Enter Flex2CF2 as the Gateway ID.
5.
Select Flex Messaging - Flex as the Gateway Type.
6.
Specify C:\CFusionMX7\wwwroot\flexgatewayexamples\handleemail.cfc as the CFC
Path.
7.
Select Automatic as the Startup Mode.
8.
Click Add Gateway Instance.