Using the Config class

Use the Config class to set the configuration parameters for ColdFusion Services, including the connection details and event handlers. Therefore, use the Config class before using any of the service classes. The parameters set on the Config class are global and can be overridden by the individual service proxy classes.

The following table lists the Config class parameters, normally used as attributes of a Config tag.

Attribute

Description

serviceUserName

The userName set in the ColdFusion Administrator with the permission to access the specific service being requested.

servicePassword

The password set in the ColdFusion Administrator for the user name.

cfServer

The server name or IP address of the CF server.

cfPort

The port on which the CF Server is running.

cfContextRoot

The context root if any for the CF server.

secureHTTP

Boolean value specifying whether to use http or https to run the service.

destination

The destination attribute can be used to specify a user defined remoting destination in WEB-INF/flex/remoting-config.xml. If not specified, default ColdFusion destination is used.

You normally specify the config class using an MXML tag as follows:

<cf:Config id="conf" cfServer="CF Server IP Address/HostName" CFPort="HTTP Port on Which CF accepts request" destination="UserDefinedRemotingDestination" >

You can also override the server settings directly in the service tag, for example:

<cf:Image id="image" action="AddBorder" cfServer="IP Address" cfPort="Port number" source="Uploaded Image server URL" thickness="5" color="Blue" destination="UserDefinedRemotingDestination" />