Adobe FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual page 136

Migrating applications to flex 2
Table of Contents

Advertisement

Flex 2 separates the definitions of services into a new file, services-config.xml. This file
contains definitions of the services and security constraints that were previously in the flex-
config.xml file. Optionally, it can include other configuration files by reference. The services-
config.xml file is located in the flex_deploy_dir/flex/WEB-INF/flex directory of a web
application in which you are using Flex Data Services. If you use the command-line compiler,
you must point to this file with the -services option.
The underlying architecture for communicating with the server for each type of service is
based on a new messaging framework in Flex 2. As a result, you use message channels to
communicate with the service. You configure channels in the services-config.xml file. The
new new messaging framework uses channels to connect clients to endpoints; requests are
made by sending messages over channels to endpoints of a message broker that directs the
messages to the correct service.
For information about the client-side configuration of RPC components, see Chapter 45,
"Using RPC Components," in the Flex 2 Developer's Guide. For information about the server-
side configuration of RPC service destinations, see Chapter 46, "Configuring RPC Services"
in the Flex 2 Developer's Guide.
Proxy use policy
In Flex 1.5, there was as setting that let you override the proxy. This was the
<proxy-use-
setting in the flex-config.xml file. If you set it to
, Flex checked the value of
policy>
client
the
attribute on the service tag. The default was to use the proxy. If you set it to
useProxy
, Flex used the proxy regardless of the value of the
attribute. If you set it to
always
useProxy
, Flex did not use the proxy regardless of the value of the
attribute.
never
useProxy
The
setting does not exist in Flex 2.
<proxy-use-policy>client</proxy-use-policy>
Flex behaves as if the value is
, which means that Flex checks the value of the
client
attribute on the service tag. The default value is
. If this value is not set, Flex
useProxy
false
does not use the proxy.
Channels
Flex now requires that you specify a channel to define the way data is transported for each
RPC service destination. Service requests and responses are now messages. Messages are sent
and received on a channel, which represents a logical connection to a destination. Channels
define a protocol and a port.
Each channel corresponds to one network transfer protocol that Flash Player supports. For
example, the AMF channel uses the AMF format over HTTP and the HTTP channel uses a
text-based format over HTTP.
136
Data Services

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents