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

Migrating applications to flex 2
Table of Contents

Advertisement

Named HTTPService
This section describes how to migrate named HTTPService tags from Flex 1.5 to Flex 2
syntax.
Flex 1.5 syntax
In Flex 1.5, a named HTTPService was defined as a named whitelist entry in the
section. You used the
service-proxy>
identify it.
MXML tag:
<mx:HTTPService id="MyService" serviceName="Salary" protocol="https"/>
flex-config.xml file:
<http-service-proxy>
<whitelist>
<named>
<service name="Salary">
<url>https://www.myServer.com/services/salary.jsp</url>
</service>
</named>
</whitelist>
</http-service-proxy>
Flex 2 syntax
In Flex 2, you use the
service in your MXML files. You also must set the value of the
Flex 2 does not support the
MXML tag:
<mx:HTTPService id="employeeHTTP" destination="Salary" useProxy="true"/>
proxy-config.xml file:
<proxy-service>
<destination id="Salary">
<properties>
<url>https://www.myServer.com/services/salary.jsp</url>
</properties>
</destination>
</proxy-service>
142
Data Services
serviceName
attribute of the HTTPService tag to identify the named
destination
property; the channel defines the protocol.
protocol
attribute of the HTTPService tag to
property to
useProxy
<http-
.
true

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flex 2

Table of Contents