MACROMEDIA FLEX 2-MIGRATING APPLICATIONS TO FLEX 2 Manual do Utilizador Página 141

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 184
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 140
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>
Vista de página 140
1 2 ... 136 137 138 139 140 141 142 143 144 145 146 ... 183 184

Comentários a estes Manuais

Sem comentários