Macromedia flex 2-migrating applications to flex 2 Manual De Usuario

Descargar
Página de 184
Migrating HTTPService components
141
Flex 1.5 syntax
In Flex 1.5, you added a URL pattern to the whitelist that matched the 
url
 of the 
HTTPService tag.
MXML tag:
<mx:HTTPService id="MyService" url="http://myServer.com/services/my.jsp"/>
flex-config.xml file:
<http-proxy>
<whitelist>
<unnamed>
<url>http://myServer.com/services/*</url>
</unnamed>
</whitelist>
</http-proxy>
Flex 2 syntax
In Flex 2, the MXML tag syntax is almost the same, but you must also set the value of the 
useProxy
 property to 
true
. Flex 2 does not support the 
protocol
 property that was available 
in Flex 1.5; the channel defines the protocol. Flex Data Services uses either the defaultHTTP 
or defaultHTTPS destination depending on whether the URL starts with HTTP or HTTPS, 
respectively.
In the services-config.xml file or a file that it includes by reference, such as the proxy-
config.xml file, you add a 
dynamic-url
 to the 
defaultHTTP
 destination for an 
HTTPService. The URL pattern must match the URL used in the MXML tag.
MXML tag:
<mx:HTTPService id="MyService" url="http://myServer.com/services/my.jsp" 
useProxy="true"/>
proxy-config.xml file:
<destination id="defaultHTTP">
<properties>
<dynamic-url>http://myServer.com/services/*</dynamic-url>
...
</properties>
</destination>