
142 Data Services
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 <http-
service-proxy>
section. You used the serviceName attribute of the HTTPService tag to
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 destination attribute of the HTTPService tag to identify the named
service in your MXML files. You also must set the value of the
useProxy property to true.
Flex 2 does not support the
protocol property; the channel defines the protocol.
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>
Commenti su questo manuale