You can set the cerdentials by doing either of the following:
Specifying credentials in ActionScript
■
Specifying credentials in the Flex destination
■
Specifying credentials in ActionScript
To specify credentials in ActionScript, you use the
the following example:
ds = new DataService("mydest");
ds.setRemoteCredentials("wilsont", "password");
Specifying credentials in the Flex destination
To specify credentials in the Flex destination, you edit the data-management-config.xml file
that is in the WEB-INF/flex folder of the server on which you want to run the Flex
application.. In the <properties> element, you include the <remote-username> and <remote-
password> elements, as follows:
<destination id="cfcontact">
<adapter ref="coldfusion-dao" />
<channels>
<channel ref="cf-dataservice-rtmp" />
</channels>
<properties>
<source>samples.contact.ContactAssembler</source>
<scope>application</scope>
<remote-username>wilsont</remote-username>
<remote-password>password</remote-password>
...
/properties>
</destination>
Enabling SSL
You can encrypt communication between ColdFusion and Flex by enabling Secure Sockets
Layer (SSL). To use SSL, you must create a keystore file. The keystore is a self-signed
certificate. (You do not need a certificate signed by a Certificate Authority, although if you do
use one, you do not need to configure Flex as indicated in the steps below.) The information
in the keystore is encrypted and can be accessed only with the password that you specify. To
create the keystore, you use the Java keytool utility, which is included in your Java Runtime
Environment (JRE).
setRemoteCredentials()
method, as in
Enabling SSL
45
Need help?
Do you have a question about the COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 and is the answer not in the manual?